|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.openjpa.enhance.PCRegistry
public class PCRegistry
Tracks registered persistence-capable classes.
Nested Class Summary | |
---|---|
static interface |
PCRegistry.RegisterClassListener
Listener for persistent class registration events. |
Constructor Summary | |
---|---|
PCRegistry()
|
Method Summary | |
---|---|
static void |
addRegisterClassListener(PCRegistry.RegisterClassListener rcl)
Register a PCRegistry.RegisterClassListener . |
static void |
copyKeyFieldsFromObjectId(Class pcClass,
FieldConsumer fm,
Object oid)
Copy fields to an outside source from the key fields in the identity object. |
static void |
copyKeyFieldsToObjectId(Class pcClass,
FieldSupplier fm,
Object oid)
Copy fields from an outside source to the key fields in the identity object. |
static void |
deRegister(ClassLoader cl)
De-Register all metadata associated with the given ClassLoader. |
static String[] |
getFieldNames(Class pcClass)
Get the field names for a PersistenceCapable class. |
static Class[] |
getFieldTypes(Class pcClass)
Get the field types for a PersistenceCapable class. |
static Class |
getPCType(Class type)
Return the persistence-capable type for type . |
static Class |
getPersistentSuperclass(Class pcClass)
Return the persistent superclass for a PersistenceCapable
class, or null if none. |
static Collection |
getRegisteredTypes()
Returns a collection of class objects of the registered persistence-capable classes. |
static String |
getTypeAlias(Class pcClass)
Return the alias for the given type. |
static boolean |
isRegistered(Class cls)
Returns true if cls is already registered. |
static PersistenceCapable |
newInstance(Class pcClass,
StateManager sm,
boolean clear)
Create a new instance of the class and assign its state manager. |
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. |
static Object |
newObjectId(Class pcClass)
Create a new identity object for the given PersistenceCapable class. |
static Object |
newObjectId(Class pcClass,
String str)
Create a new identity object for the given PersistenceCapable class, using the String
form of the constructor. |
static void |
register(Class pcClass,
String[] fieldNames,
Class[] fieldTypes,
byte[] fieldFlags,
Class sup,
String alias,
PersistenceCapable pc)
Register metadata by class. |
static void |
removeRegisterClassListener(PCRegistry.RegisterClassListener rcl)
Removes a PCRegistry.RegisterClassListener . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PCRegistry()
Method Detail |
---|
public static void addRegisterClassListener(PCRegistry.RegisterClassListener rcl)
PCRegistry.RegisterClassListener
.
public static void removeRegisterClassListener(PCRegistry.RegisterClassListener rcl)
PCRegistry.RegisterClassListener
.
public static String[] getFieldNames(Class pcClass)
PersistenceCapable
class.
public static Class[] getFieldTypes(Class pcClass)
PersistenceCapable
class.
public static Class getPersistentSuperclass(Class pcClass)
PersistenceCapable
class, or null if none. The superclass may or may not implement
PersistenceCapable
, depending on the access type of the class.
public static PersistenceCapable newInstance(Class pcClass, StateManager sm, boolean clear)
LOAD_REQUIRED
.
public static PersistenceCapable newInstance(Class pcClass, StateManager sm, Object oid, boolean clear)
LOAD_REQUIRED
.
public static Class getPCType(Class type)
type
. This might
be a generated subclass of type
.
public static Object newObjectId(Class pcClass)
PersistenceCapable
class.
public static Object newObjectId(Class pcClass, String str)
PersistenceCapable
class, using the String
form of the constructor.
public static String getTypeAlias(Class pcClass)
public static void copyKeyFieldsToObjectId(Class pcClass, FieldSupplier fm, Object oid)
public static void copyKeyFieldsFromObjectId(Class pcClass, FieldConsumer fm, Object oid)
public static void register(Class pcClass, String[] fieldNames, Class[] fieldTypes, byte[] fieldFlags, Class sup, String alias, PersistenceCapable pc)
fieldTypes
- managed field typesfieldFlags
- managed field flagssup
- the most immediate persistent superclasspcClass
- the PersistenceCapable
classfieldNames
- managed field namesalias
- the class aliaspc
- an instance of the class, if not abstractpublic static void deRegister(ClassLoader cl)
cl
- the ClassLoaderpublic static Collection getRegisteredTypes()
public static boolean isRegistered(Class cls)
true
if cls
is already registered.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This documentation is deprecated and will be removed in the next release of WebLogic Server.