org.apache.openjpa.util
public class ImplHelper extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.util.Map |
_unenhancedInstanceMap |
Constructor and Description |
---|
ImplHelper() |
Modifier and Type | Method and Description |
---|---|
static void |
close(java.lang.Object o)
Close the given resource.
|
static java.lang.Object |
generateFieldValue(StoreContext ctx,
FieldMetaData fmd)
Generate a value for the given metadata, or return null.
|
static java.lang.Object |
generateIdentityValue(StoreContext ctx,
ClassMetaData meta,
int typeCode)
Generate a value for the given metadata, or return null.
|
static java.lang.Object |
getManagedInstance(java.lang.Object o) |
static java.util.BitSet |
getUpdateFields(OpenJPAStateManager sm)
Returns the fields of the state that require an update.
|
static boolean |
isAssignable(java.lang.Class from,
java.lang.Class to)
Returns true if the referenced "to" class is assignable to the "from"
class.
|
static boolean |
isManageable(java.lang.Object instance)
Returns true if the specified instance is manageable.
|
static boolean |
isManagedType(OpenJPAConfiguration conf,
java.lang.Class type)
Returns true if the specified class is a type that can be managed by
OpenJPA.
|
static java.util.Collection |
loadAll(java.util.Collection sms,
StoreManager store,
PCState state,
int load,
FetchConfiguration fetch,
java.lang.Object context)
Helper for store manager implementations.
|
static void |
registerPersistenceCapable(ReflectingPersistenceCapable pc) |
static PersistenceCapable |
toPersistenceCapable(java.lang.Object o,
java.lang.Object ctx) |
public static java.util.Collection loadAll(java.util.Collection sms, StoreManager store, PCState state, int load, FetchConfiguration fetch, java.lang.Object context)
public static java.lang.Object generateIdentityValue(StoreContext ctx, ClassMetaData meta, int typeCode)
ValueStrategies.SEQUENCE
,
ValueStrategies.UUID_STRING
, ValueStrategies.UUID_HEX
public static java.lang.Object generateFieldValue(StoreContext ctx, FieldMetaData fmd)
ValueStrategies.SEQUENCE
,
ValueStrategies.UUID_STRING
, ValueStrategies.UUID_HEX
public static java.util.BitSet getUpdateFields(OpenJPAStateManager sm)
sm
- the state to checkpublic static void close(java.lang.Object o)
public static boolean isManagedType(OpenJPAConfiguration conf, java.lang.Class type)
type
- the class to testpublic static boolean isManageable(java.lang.Object instance)
instance
- the object to checkpublic static boolean isAssignable(java.lang.Class from, java.lang.Class to)
from
- target class instance to be checked for assignabilityto
- second class instance to be checked for assignabilitypublic static PersistenceCapable toPersistenceCapable(java.lang.Object o, java.lang.Object ctx)
o
, or null
if o
is not manageable.public static void registerPersistenceCapable(ReflectingPersistenceCapable pc)
public static java.lang.Object getManagedInstance(java.lang.Object o)
o
.