Top Description Fields Constructors Methods
org.eclipse.persistence.tools.schemaframework

public Class PopulationManager

extends Object
Class Inheritance
Imports
java.util.*, org.eclipse.persistence.descriptors.ClassDescriptor, org.eclipse.persistence.internal.sessions.AbstractSession

Purpose: This class is used to populate example data into the database, it allows for circular references to be resolved.

Responsibilities:

Field Summary

Modifier and TypeField and Description
protected static PopulationManager
defaultManager

Store the default instance.

protected Map<Class<?>, Map<String, Object>>
registeredObjects

Store the objects registered.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod 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<Class<?>>
getAllClasses()

Return all of the objects registered.

public Vector<Object>
getAllObjects()

Return all of the objects registered.

public List<Object>
getAllObjectsForAbstractClass(Class<?> objectsClass)

Return all of the objects of the class and all of its subclasses.

public List<Object>
getAllObjectsForAbstractClass(Class<?> objectsClass, AbstractSession session)

Return all of the objects of the class and all of its subclasses.

public Vector<Object>
getAllObjectsForClass(Class<?> objectsClass)

Return all of the objects of the class.

public static PopulationManager
getDefaultManager()

Lazy initialize the default instance.

public Object
getObject(Class<?> objectsClass, String objectsName)

Return the object registered given its name.

public Map<Class<?>, Map<String, Object>>
getRegisteredObjects()

Return the registered objects.

public Object
registerObject(Class<?> javaClass, Object objectToRegister, String objectsName)

Register the object given its name.

public Object
registerObject(Object objectToRegister, String objectsName)

Register the object given its name.

public void
removeObject(Class<?> classToRemove, String objectsName)

Remove the object given its class and name.

public Object
removeObject(Object objectToRemove, String objectsName)

Remove the object given its name.

public static void
resetDefaultManager()

Reset the default instance.

public static void
setDefaultManager(PopulationManager theDefaultManager)

Set the default instance.

public void
setRegisteredObjects(Map<Class<?>, Map<String, Object>> registeredObjects)

Set the registered objects.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

defaultManagerback to summary
protected static PopulationManager defaultManager

Store the default instance.

registeredObjectsback to summary
protected Map<Class<?>, Map<String, Object>> registeredObjects

Store the objects registered.

Constructor Detail

PopulationManagerback to summary
public PopulationManager()

Method Detail

addAllObjectsForAbstractClassback 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.

addAllObjectsForAbstractClassback 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.

addAllObjectsForClassback to summary
public void addAllObjectsForClass(Class<?> objectsClass, List<Object> allObjects)

Add all of the objects of the class.

containsObjectback to summary
public boolean containsObject(Class<?> objectsClass, String objectsName)

Check if the object is registered given its name.

containsObjectback to summary
public boolean containsObject(Object objectToCheck, String objectsName)

Check if the object is registered given its name.

getAllClassesback to summary
public List<Class<?>> getAllClasses()

Return all of the objects registered.

getAllObjectsback to summary
public Vector<Object> getAllObjects()

Return all of the objects registered.

getAllObjectsForAbstractClassback to summary
public List<Object> getAllObjectsForAbstractClass(Class<?> objectsClass)

Return all of the objects of the class and all of its subclasses.

getAllObjectsForAbstractClassback to summary
public List<Object> getAllObjectsForAbstractClass(Class<?> objectsClass, 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.

getAllObjectsForClassback to summary
public Vector<Object> getAllObjectsForClass(Class<?> objectsClass)

Return all of the objects of the class.

getDefaultManagerback to summary
public static PopulationManager getDefaultManager()

Lazy initialize the default instance.

getObjectback to summary
public Object getObject(Class<?> objectsClass, String objectsName)

Return the object registered given its name.

getRegisteredObjectsback to summary
public Map<Class<?>, Map<String, Object>> getRegisteredObjects()

Return the registered objects.

registerObjectback 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.

registerObjectback 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.

removeObjectback to summary
public void removeObject(Class<?> classToRemove, String objectsName)

Remove the object given its class and name.

removeObjectback to summary
public Object removeObject(Object objectToRemove, String objectsName)

Remove the object given its name.

resetDefaultManagerback to summary
public static void resetDefaultManager()

Reset the default instance.

setDefaultManagerback to summary
public static void setDefaultManager(PopulationManager theDefaultManager)

Set the default instance.

setRegisteredObjectsback to summary
public void setRegisteredObjects(Map<Class<?>, Map<String, Object>> registeredObjects)

Set the registered objects.