Class UserDataMap

All Implemented Interfaces:
Serializable, Cloneable, Map<Integer,UserData>

public class UserDataMap extends HashMap<Integer,UserData>
A class to support a map of UserData beans. This class implements Map to allow it to be accessed directly via JSP Expression Language.
Since:
1.0
Version:
9.0
Author:
Luke
See Also:
  • Constructor Details

    • UserDataMap

      public UserDataMap()
      Creates a new, empty UserDataCollection.
    • UserDataMap

      public UserDataMap(Collection<UserData> data)
      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

      public UserData get(int id)
      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

      public Collection<UserData> getByTable(String tableName)
      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

      public Collection<String> getTableNames()
      Returns all tables containing Users within this container.
      Returns:
      a Collection of table names in DB.TABLE format
    • getDomains

      public Collection<String> getDomains()
      Returns all domains containing users within this container.
      Returns:
      a Collection of domain names
    • getAllIDs

      public Collection<Integer> getAllIDs()
      Returns the database IDs across all databases for every user within this container.
      Returns:
      a Collection of database IDs
    • toString

      public String toString()
      Overrides:
      toString in class AbstractMap<Integer,UserData>