Class PopulationManager
java.lang.Object
org.eclipse.persistence.tools.schemaframework.PopulationManager
Purpose: This class is used to populate example data into the database, it allows for circular references to be resolved.
Responsibilities:
- Allow objects to be registered.
- Allow objects to be looked up.
- Store a globally accessible default instance.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected static PopulationManagerStore the default instance.protected HashtableStore the objects registered.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddAllObjectsForAbstractClass(Class objectsClass, org.eclipse.persistence.internal.sessions.AbstractSession session, Vector allObjects) Add all of the objects of the class and all of its subclasses.voidaddAllObjectsForAbstractClass(Class objectsClass, Session session, Vector allObjects) Add all of the objects of the class and all of its subclasses.voidaddAllObjectsForClass(Class objectsClass, List allObjects) Add all of the objects of the class.booleancontainsObject(Class objectsClass, String objectsName) Check if the object is registered given its name.booleancontainsObject(Object objectToCheck, String objectsName) Check if the object is registered given its name.Return all of the objects registered.Return all of the objects registered.getAllObjectsForAbstractClass(Class objectsClass) Return all of the objects of the class and all of its subclasses.getAllObjectsForAbstractClass(Class objectsClass, org.eclipse.persistence.internal.sessions.AbstractSession session) Return all of the objects of the class and all of its subclasses.getAllObjectsForClass(Class objectsClass) Return all of the objects of the class.static PopulationManagerLazy initialize the default instance.Return the object registered given its name.Return the registered objects.registerObject(Class javaClass, Object objectToRegister, String objectsName) Register the object given its name.registerObject(Object objectToRegister, String objectsName) Register the object given its name.voidremoveObject(Class classToRemove, String objectsName) Remove the object given its class and name.removeObject(Object objectToRemove, String objectsName) Remove the object given its name.static voidReset the default instance.static voidsetDefaultManager(PopulationManager theDefaultManager) Set the default instance.voidsetRegisteredObjects(Hashtable registeredObjects) Set the registered objects.
- 
Field Details- 
registeredObjectsStore the objects registered.
- 
defaultManagerStore the default instance.
 
- 
- 
Constructor Details- 
PopulationManagerpublic PopulationManager()
 
- 
- 
Method Details- 
addAllObjectsForAbstractClasspublic void addAllObjectsForAbstractClass(Class objectsClass, org.eclipse.persistence.internal.sessions.AbstractSession session, Vector 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.
- 
addAllObjectsForAbstractClassAdd 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.
- 
addAllObjectsForClassAdd all of the objects of the class.
- 
containsObjectCheck if the object is registered given its name.
- 
containsObjectCheck if the object is registered given its name.
- 
getAllClassesReturn all of the objects registered.
- 
getAllObjectsReturn all of the objects registered.
- 
getAllObjectsForAbstractClassReturn all of the objects of the class and all of its subclasses.
- 
getAllObjectsForAbstractClasspublic Vector getAllObjectsForAbstractClass(Class objectsClass, org.eclipse.persistence.internal.sessions.AbstractSession session) 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.
- 
getAllObjectsForClassReturn all of the objects of the class.
- 
getDefaultManagerLazy initialize the default instance.
- 
getObjectReturn the object registered given its name.
- 
getRegisteredObjectsReturn the registered objects.
- 
registerObjectRegister the object given its name. The objects are represented as a hashtable of hashtables, lazy initialized on the class.
- 
registerObjectRegister the object given its name. The objects are represented as a hashtable of hashtables, lazy initialized on the class.
- 
removeObjectRemove the object given its class and name.
- 
removeObjectRemove the object given its name.
- 
resetDefaultManagerpublic static void resetDefaultManager()Reset the default instance.
- 
setDefaultManagerSet the default instance.
- 
setRegisteredObjectsSet the registered objects.
 
-