|
||||||||||
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. |
java.lang.reflect.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. |
protected java.lang.String |
getFieldName(java.lang.reflect.Member member)
Return the field name for the given member. |
boolean |
getIgnoreNonPersistent()
|
boolean |
getUsePCRegistry()
Whether to attempt to use the information from registered classes to populate metadata defaults. |
protected abstract boolean |
isDefaultPersistent(ClassMetaData meta,
java.lang.reflect.Member member,
java.lang.String name)
Return true if the given member is persistent by default. |
protected boolean |
isReservedFieldName(java.lang.String name)
Returns true if the given field name is reserved for unmanaged fields. |
protected static boolean |
isUserDefined(java.lang.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 |
setDefaultAccessType(int access)
The default access type for base classes with ACCESS_UNKNOWN. |
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 void setDefaultAccessType(int access)
public int getDefaultAccessType()
getDefaultAccessType
in interface MetaDataDefaults
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 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 java.lang.String getFieldName(java.lang.reflect.Member member)
protected boolean isReservedFieldName(java.lang.String name)
protected abstract boolean isDefaultPersistent(ClassMetaData meta, java.lang.reflect.Member member, java.lang.String name)
name
- the field name from getFieldName(java.lang.reflect.Member)
public java.lang.reflect.Member getBackingMember(FieldMetaData fmd)
MetaDataDefaults
getBackingMember
in interface MetaDataDefaults
protected static boolean isUserDefined(java.lang.Class cls)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |