|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.meta.AbstractMetaDataDefaults
public abstract class AbstractMetaDataDefaults
Abstract metadata defaults.
Field Summary |
---|
Fields inherited from interface org.apache.openjpa.event.CallbackModes |
---|
CALLBACK_FAIL_FAST, CALLBACK_IGNORE, CALLBACK_LOG, CALLBACK_RETHROW, CALLBACK_ROLLBACK |
Constructor Summary | |
---|---|
AbstractMetaDataDefaults()
|
Method Summary | |
---|---|
protected int |
getAccessType(ClassMetaData meta)
Return the access type of the given metadata. |
Member |
getBackingMember(FieldMetaData fmd)
Return the backing member for the given field metadata. |
int |
getCallbackMode()
What to do on lifecycle callback exceptions. |
boolean |
getCallbacksBeforeListeners(int type)
If callbacks are fired before listeners for the given event type. |
int |
getDefaultAccessType()
The default access type for base classes with ACCESS_UNKNOWN. |
int |
getDefaultIdentityType()
The default identity type for unmapped classes without primary key fields. |
protected String |
getFieldName(Member member)
Return the field name for the given member. |
boolean |
getIgnoreNonPersistent()
|
Class |
getUnimplementedExceptionType()
Return a runtime exception class to throw for un-implemented managed interface methods. |
boolean |
getUsePCRegistry()
Whether to attempt to use the information from registered classes to populate metadata defaults. |
boolean |
isDataStoreObjectIdFieldUnwrapped()
Whether the field in the object id class corresponding to a datastore id persistence-capable primary key field is the simple datastore id value of the related instance. |
boolean |
isDeclaredInterfacePersistent()
Whether declared interfaces of a class are treated as persistent types. |
protected abstract boolean |
isDefaultPersistent(ClassMetaData meta,
Member member,
String name)
Return true if the given member is persistent by default. |
protected boolean |
isReservedFieldName(String name)
Returns true if the given field name is reserved for unmanaged fields. |
protected static boolean |
isUserDefined(Class cls)
Helper method; returns true if the given class appears to be user-defined. |
void |
populate(ClassMetaData meta,
int access)
Populate the given metadata with default settings. |
protected void |
populate(FieldMetaData fmd)
Populate initial field data. |
void |
setCallbackMode(int mode)
|
void |
setCallbackMode(int mode,
boolean on)
|
void |
setDataStoreObjectIdFieldUnwrapped(boolean unwrapped)
|
void |
setDeclaredInterfacePersistent(boolean pers)
|
void |
setDefaultAccessType(int access)
The default access type for base classes with ACCESS_UNKNOWN. |
void |
setDefaultIdentityType(int identity)
The default identity type for unmapped classes without primary key fields. |
void |
setIgnoreNonPersistent(boolean ignore)
Whether to ignore members which are not persistent by default during metadata population. |
void |
setUsePCRegistry(boolean pcRegistry)
Whether to attempt to use the information from registered classes to populate metadata defaults. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractMetaDataDefaults()
Method Detail |
---|
public boolean getUsePCRegistry()
public void setUsePCRegistry(boolean pcRegistry)
public int getDefaultAccessType()
getDefaultAccessType
in interface MetaDataDefaults
public void setDefaultAccessType(int access)
public int getDefaultIdentityType()
getDefaultIdentityType
in interface MetaDataDefaults
public void setDefaultIdentityType(int identity)
public int getCallbackMode()
MetaDataDefaults
getCallbackMode
in interface MetaDataDefaults
public void setCallbackMode(int mode)
public void setCallbackMode(int mode, boolean on)
public boolean getCallbacksBeforeListeners(int type)
MetaDataDefaults
getCallbacksBeforeListeners
in interface MetaDataDefaults
public boolean isDeclaredInterfacePersistent()
MetaDataDefaults
isDeclaredInterfacePersistent
in interface MetaDataDefaults
public void setDeclaredInterfacePersistent(boolean pers)
public boolean isDataStoreObjectIdFieldUnwrapped()
MetaDataDefaults
isDataStoreObjectIdFieldUnwrapped
in interface MetaDataDefaults
public void setDataStoreObjectIdFieldUnwrapped(boolean unwrapped)
public boolean getIgnoreNonPersistent()
public void setIgnoreNonPersistent(boolean ignore)
MetaDataDefaults
setIgnoreNonPersistent
in interface MetaDataDefaults
public void populate(ClassMetaData meta, int access)
MetaDataDefaults
populate
in interface MetaDataDefaults
access
- access type constant from ClassMetaData
protected void populate(FieldMetaData fmd)
protected int getAccessType(ClassMetaData meta)
protected String getFieldName(Member member)
protected boolean isReservedFieldName(String name)
protected abstract boolean isDefaultPersistent(ClassMetaData meta, Member member, String name)
name
- the field name from getFieldName(java.lang.reflect.Member)
public Member getBackingMember(FieldMetaData fmd)
MetaDataDefaults
getBackingMember
in interface MetaDataDefaults
public Class getUnimplementedExceptionType()
MetaDataDefaults
getUnimplementedExceptionType
in interface MetaDataDefaults
protected static boolean isUserDefined(Class cls)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |