org.rhq.helpers.perftest.support.jpa.mapping
Class ColumnValuesTableMap

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<String,Set<ColumnValues>>
          extended by org.rhq.helpers.perftest.support.jpa.mapping.ColumnValuesTableMap
All Implemented Interfaces:
Serializable, Cloneable, Map<String,Set<ColumnValues>>

public class ColumnValuesTableMap
extends HashMap<String,Set<ColumnValues>>

Represents a map where keys are names of database tables and values are sets of column values (ColumnValues instances). Adds getOrCreate(Object) method to safely retrieve initialized values even for previously non-existent keys.

Author:
Lukas Krejci
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
ColumnValuesTableMap()
           
 
Method Summary
 Set<ColumnValues> getOrCreate(Object key)
          Retrieves a set of column values for given table name.
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

ColumnValuesTableMap

public ColumnValuesTableMap()
Method Detail

getOrCreate

public Set<ColumnValues> getOrCreate(Object key)
Retrieves a set of column values for given table name. If there was no entry for the table name in this map, a new empty set is created, added to the map and returned.

Parameters:
key - the name of the table
Returns:
a set of column values


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.