Class UserDataMap
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<Integer,
UserData>
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,
V>, AbstractMap.SimpleImmutableEntry<K, V> -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new, empty UserDataCollection.UserDataMap
(Collection<UserData> data) Creates a new UserDataCollection from a set of Integers containing database IDs. -
Method Summary
Modifier and TypeMethodDescriptionboolean
contains
(int id) Returns if the collection contains an entry for a particular user.get
(int id) Returns an entry for a particular user.Returns the database IDs across all databases for every user within this container.getByTable
(String tableName) Returns all entries present within a particular table.Returns all domains containing users within this container.Returns all tables containing Users within this container.toString()
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode
-
Constructor Details
-
UserDataMap
public UserDataMap()Creates a new, empty UserDataCollection. -
UserDataMap
Creates a new UserDataCollection from a set of Integers containing database IDs.- Parameters:
data
- a Collection of UserData objects- See Also:
-
-
Method Details
-
contains
public boolean contains(int id) Returns if the collection contains an entry for a particular user.- Parameters:
id
- the User's database ID- Returns:
- TRUE if data for the User is present, otherwise FALSE
-
get
Returns an entry for a particular user.- Parameters:
id
- the User's database ID- Returns:
- the UserData bean, or null if not found
- See Also:
-
getByTable
Returns all entries present within a particular table.- Parameters:
tableName
- the database table name- Returns:
- a Collection of UserData objects
- Throws:
NullPointerException
- if tableName is null
-
getTableNames
Returns all tables containing Users within this container.- Returns:
- a Collection of table names in DB.TABLE format
-
getDomains
Returns all domains containing users within this container.- Returns:
- a Collection of domain names
-
getAllIDs
Returns the database IDs across all databases for every user within this container.- Returns:
- a Collection of database IDs
-
toString
- Overrides:
toString
in classAbstractMap<Integer,
UserData>
-