Purpose: This class is used to populate example data into the database, it allows for circular references to be resolved.
Responsibilities:
| Modifier and Type | Field and Description |
|---|---|
| protected static PopulationManager | defaultManager
Store the default instance. |
| protected Map | registeredObjects
Store the objects registered. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addAllObjectsForAbstractClass(Class<?> objectsClass, AbstractSession session, Vector<Object> allObjects)
Add all of the objects of the class and all of its subclasses. |
| public void | addAllObjectsForAbstractClass(Class<?> objectsClass, Session session, Vector<Object> allObjects)
Add all of the objects of the class and all of its subclasses. |
| public void | addAllObjectsForClass(Class<?> objectsClass, List<Object> allObjects)
Add all of the objects of the class. |
| public boolean | containsObject(Class<?> objectsClass, String objectsName)
Check if the object is registered given its name. |
| public boolean | containsObject(Object objectToCheck, String objectsName)
Check if the object is registered given its name. |
| public List | |
| public Vector | |
| public List | getAllObjectsForAbstractClass(Class<?> objectsClass)
Return all of the objects of the class and all of its subclasses. |
| public List | getAllObjectsForAbstractClass(Class<?> objectsClass, AbstractSession session)
Return all of the objects of the class and all of its subclasses. |
| public Vector | |
| public static PopulationManager | |
| public Object | |
| public Map | |
| public Object | registerObject(Class<?> javaClass, Object objectToRegister, String objectsName)
Register the object given its name. |
| public Object | |
| public void | |
| public Object | |
| public static void | |
| public static void | |
| public void |
| defaultManager | back to summary |
|---|---|
| protected static PopulationManager defaultManager Store the default instance. | |
| registeredObjects | back to summary |
|---|---|
| protected Map<Class<?>, Map<String, Object>> registeredObjects Store the objects registered. | |
| PopulationManager | back to summary |
|---|---|
| public PopulationManager() | |
| addAllObjectsForAbstractClass | back to summary |
|---|---|
| public void addAllObjectsForAbstractClass(Class<?> objectsClass, AbstractSession session, Vector<Object> allObjects) Add all of the objects of the class and all of its subclasses. The session is needed because there is no other way to find all subclasses. | |
| addAllObjectsForAbstractClass | back to summary |
|---|---|
| public void addAllObjectsForAbstractClass(Class<?> objectsClass, Session session, Vector<Object> allObjects) Add all of the objects of the class and all of its subclasses. The session is needed because there is no other way to find all subclasses. | |
| addAllObjectsForClass | back to summary |
|---|---|
| public void addAllObjectsForClass(Class<?> objectsClass, List<Object> allObjects) Add all of the objects of the class. | |
| containsObject | back to summary |
|---|---|
| public boolean containsObject(Class<?> objectsClass, String objectsName) Check if the object is registered given its name. | |
| containsObject | back to summary |
|---|---|
| public boolean containsObject(Object objectToCheck, String objectsName) Check if the object is registered given its name. | |
| getAllClasses | back to summary |
|---|---|
| public List Return all of the objects registered. | |
| getAllObjects | back to summary |
|---|---|
| public Vector Return all of the objects registered. | |
| getAllObjectsForAbstractClass | back to summary |
|---|---|
| public List Return all of the objects of the class and all of its subclasses. | |
| getAllObjectsForAbstractClass | back to summary |
|---|---|
| public List Return all of the objects of the class and all of its subclasses. The session is needed because there is no other way to find all subclasses. | |
| getAllObjectsForClass | back to summary |
|---|---|
| public Vector Return all of the objects of the class. | |
| getDefaultManager | back to summary |
|---|---|
| public static PopulationManager getDefaultManager() Lazy initialize the default instance. | |
| getObject | back to summary |
|---|---|
| public Object getObject(Class<?> objectsClass, String objectsName) Return the object registered given its name. | |
| getRegisteredObjects | back to summary |
|---|---|
| public Map Return the registered objects. | |
| registerObject | back to summary |
|---|---|
| public Object registerObject(Class<?> javaClass, Object objectToRegister, String objectsName) Register the object given its name. The objects are represented as a hashtable of hashtables, lazy initialized on the class. | |
| registerObject | back to summary |
|---|---|
| public Object registerObject(Object objectToRegister, String objectsName) Register the object given its name. The objects are represented as a hashtable of hashtables, lazy initialized on the class. | |
| removeObject | back to summary |
|---|---|
| public void removeObject(Class<?> classToRemove, String objectsName) Remove the object given its class and name. | |
| removeObject | back to summary |
|---|---|
| public Object removeObject(Object objectToRemove, String objectsName) Remove the object given its name. | |
| resetDefaultManager | back to summary |
|---|---|
| public static void resetDefaultManager() Reset the default instance. | |
| setDefaultManager | back to summary |
|---|---|
| public static void setDefaultManager(PopulationManager theDefaultManager) Set the default instance. | |
| setRegisteredObjects | back to summary |
|---|---|
| public void setRegisteredObjects(Map<Class<?>, Map<String, Object>> registeredObjects) Set the registered objects. | |