| java.lang.Object org.apache.openjpa.enhance.PCRegistry
All known Subclasses: org.apache.openjpa.meta.MetaDataRepository,
PCRegistry | public class PCRegistry (Code) | | Tracks registered persistence-capable classes.
since: 0.4.0 author: Abe White |
Inner Class :public static interface RegisterClassListener | |
Method Summary | |
public static void | addRegisterClassListener(RegisterClassListener rcl) Register a
RegisterClassListener . | public static void | copyKeyFieldsFromObjectId(Class pcClass, FieldConsumer fm, Object oid) Copy fields to an outside source from the key fields in the identity
object. | public static void | copyKeyFieldsToObjectId(Class pcClass, FieldSupplier fm, Object oid) Copy fields from an outside source to the key fields in the identity
object. | public static void | deRegister(ClassLoader cl) De-Register all metadata associated with the given ClassLoader. | public static String[] | getFieldNames(Class pcClass) Get the field names for a PersistenceCapable class. | public static Class[] | getFieldTypes(Class pcClass) Get the field types for a PersistenceCapable class. | public static Class | getPCType(Class type) Return the persistence-capable type for type . | public static Class | getPersistentSuperclass(Class pcClass) Return the persistent superclass for a PersistenceCapable
class, or null if none. | public static Collection | getRegisteredTypes() Returns a collection of class objects of the registered
persistence-capable classes. | public static String | getTypeAlias(Class pcClass) Return the alias for the given type. | public static boolean | isRegistered(Class cls) Returns true if cls is already registered. | public static PersistenceCapable | newInstance(Class pcClass, StateManager sm, boolean clear) Create a new instance of the class and assign its state manager. | public static PersistenceCapable | newInstance(Class pcClass, StateManager sm, Object oid, boolean clear) Create a new instance of the class and assign its state manager and oid. | public static Object | newObjectId(Class pcClass) Create a new identity object for the given
PersistenceCapable class. | public static Object | newObjectId(Class pcClass, String str) Create a new identity object for the given
PersistenceCapable class, using the String
form of the constructor. | public static void | register(Class pcClass, String[] fieldNames, Class[] fieldTypes, byte[] fieldFlags, Class sup, String alias, PersistenceCapable pc) Register metadata by class. | public static void | removeRegisterClassListener(RegisterClassListener rcl) Removes a
RegisterClassListener . |
addRegisterClassListener | public static void addRegisterClassListener(RegisterClassListener rcl)(Code) | | Register a
RegisterClassListener .
|
copyKeyFieldsFromObjectId | public static void copyKeyFieldsFromObjectId(Class pcClass, FieldConsumer fm, Object oid)(Code) | | Copy fields to an outside source from the key fields in the identity
object.
|
copyKeyFieldsToObjectId | public static void copyKeyFieldsToObjectId(Class pcClass, FieldSupplier fm, Object oid)(Code) | | Copy fields from an outside source to the key fields in the identity
object.
|
deRegister | public static void deRegister(ClassLoader cl)(Code) | | De-Register all metadata associated with the given ClassLoader.
Allows ClassLoaders to be garbage collected.
Parameters: cl - the ClassLoader |
getFieldNames | public static String[] getFieldNames(Class pcClass)(Code) | | Get the field names for a PersistenceCapable class.
|
getFieldTypes | public static Class[] getFieldTypes(Class pcClass)(Code) | | Get the field types for a PersistenceCapable class.
|
getPCType | public static Class getPCType(Class type)(Code) | | Return the persistence-capable type for type . This might
be a generated subclass of type .
since: 1.1.0 |
getPersistentSuperclass | public static Class getPersistentSuperclass(Class pcClass)(Code) | | Return the persistent superclass for a PersistenceCapable
class, or null if none. The superclass may or may not implement
PersistenceCapable , depending on the access type of the class.
|
getRegisteredTypes | public static Collection getRegisteredTypes()(Code) | | Returns a collection of class objects of the registered
persistence-capable classes.
|
getTypeAlias | public static String getTypeAlias(Class pcClass)(Code) | | Return the alias for the given type.
|
isRegistered | public static boolean isRegistered(Class cls)(Code) | | Returns true if cls is already registered.
|
newInstance | public static PersistenceCapable newInstance(Class pcClass, StateManager sm, boolean clear)(Code) | | Create a new instance of the class and assign its state manager.
The new instance has its flags set to LOAD_REQUIRED .
|
newInstance | public static PersistenceCapable newInstance(Class pcClass, StateManager sm, Object oid, boolean clear)(Code) | | Create a new instance of the class and assign its state manager and oid.
The new instance has its flags set to LOAD_REQUIRED .
|
newObjectId | public static Object newObjectId(Class pcClass)(Code) | | Create a new identity object for the given
PersistenceCapable class.
|
newObjectId | public static Object newObjectId(Class pcClass, String str)(Code) | | Create a new identity object for the given
PersistenceCapable class, using the String
form of the constructor.
|
register | public static void register(Class pcClass, String[] fieldNames, Class[] fieldTypes, byte[] fieldFlags, Class sup, String alias, PersistenceCapable pc)(Code) | | Register metadata by class.
Parameters: fieldTypes - managed field types Parameters: fieldFlags - managed field flags Parameters: sup - the most immediate persistent superclass Parameters: pcClass - the PersistenceCapable class Parameters: fieldNames - managed field names Parameters: alias - the class alias Parameters: pc - an instance of the class, if not abstract |
removeRegisterClassListener | public static void removeRegisterClassListener(RegisterClassListener rcl)(Code) | | Removes a
RegisterClassListener .
|
|
|