|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.util.ImplHelper
public class ImplHelper
Helper for OpenJPA back-ends.
Field Summary | |
---|---|
static Map |
_unenhancedInstanceMap
|
Constructor Summary | |
---|---|
ImplHelper()
|
Method Summary | |
---|---|
static void |
close(Object o)
Close the given resource. |
static Object |
generateFieldValue(StoreContext ctx,
FieldMetaData fmd)
Generate a value for the given metadata, or return null. |
static Object |
generateIdentityValue(StoreContext ctx,
ClassMetaData meta,
int typeCode)
Generate a value for the given metadata, or return null. |
static Object |
getManagedInstance(Object o)
|
static BitSet |
getUpdateFields(OpenJPAStateManager sm)
Returns the fields of the state that require an update. |
static boolean |
isAssignable(Class from,
Class to)
Returns true if the referenced "to" class is assignable to the "from" class. |
static boolean |
isManageable(Object instance)
Returns true if the specified instance is manageable. |
static boolean |
isManagedType(OpenJPAConfiguration conf,
Class type)
Returns true if the specified class is a type that can be managed by OpenJPA. |
static Collection |
loadAll(Collection sms,
StoreManager store,
PCState state,
int load,
FetchConfiguration fetch,
Object context)
Helper for store manager implementations. |
static void |
registerPersistenceCapable(ReflectingPersistenceCapable pc)
|
static PersistenceCapable |
toPersistenceCapable(Object o,
Object ctx)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Map _unenhancedInstanceMap
Constructor Detail |
---|
public ImplHelper()
Method Detail |
---|
public static Collection loadAll(Collection sms, StoreManager store, PCState state, int load, FetchConfiguration fetch, Object context)
StoreManager.loadAll(java.util.Collection, org.apache.openjpa.kernel.PCState, int, org.apache.openjpa.kernel.FetchConfiguration, java.lang.Object)
public static Object generateIdentityValue(StoreContext ctx, ClassMetaData meta, int typeCode)
ValueStrategies.SEQUENCE
,
ValueStrategies.UUID_STRING
, ValueStrategies.UUID_HEX
public static Object generateFieldValue(StoreContext ctx, FieldMetaData fmd)
ValueStrategies.SEQUENCE
,
ValueStrategies.UUID_STRING
, ValueStrategies.UUID_HEX
public static BitSet getUpdateFields(OpenJPAStateManager sm)
sm
- the state to check
public static void close(Object o)
public static boolean isManagedType(OpenJPAConfiguration conf, Class type)
type
- the class to test
public static boolean isManageable(Object instance)
instance
- the object to check
public static boolean isAssignable(Class from, Class to)
from
- target class instance to be checked for assignabilityto
- second class instance to be checked for assignability
public static PersistenceCapable toPersistenceCapable(Object o, Object ctx)
o
, or null
if o
is not manageable.public static void registerPersistenceCapable(ReflectingPersistenceCapable pc)
public static Object getManagedInstance(Object o)
o
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |