public class PersistenceMetaDataDefaults extends AbstractMetaDataDefaults
Modifier and Type | Field and Description |
---|---|
protected org.apache.openjpa.persistence.PersistenceMetaDataDefaults.AnnotatedFilter |
annotatedFilter |
protected org.apache.openjpa.persistence.PersistenceMetaDataDefaults.AccessFilter |
fieldAccessFilter |
protected org.apache.openjpa.persistence.PersistenceMetaDataDefaults.MemberFilter |
fieldFilter |
protected org.apache.openjpa.persistence.PersistenceMetaDataDefaults.GetterFilter |
getterFilter |
protected org.apache.openjpa.persistence.PersistenceMetaDataDefaults.MemberFilter |
methodFilter |
protected org.apache.openjpa.persistence.PersistenceMetaDataDefaults.TransientFilter |
nonTransientFilter |
protected org.apache.openjpa.persistence.PersistenceMetaDataDefaults.AccessFilter |
propertyAccessFilter
Set of Inclusion Filters based on member type, access type or transient
annotations.
|
protected org.apache.openjpa.persistence.PersistenceMetaDataDefaults.SetterFilter |
setterFilter |
CALLBACK_FAIL_FAST, CALLBACK_IGNORE, CALLBACK_LOG, CALLBACK_RETHROW, CALLBACK_ROLLBACK
Constructor and Description |
---|
PersistenceMetaDataDefaults() |
Modifier and Type | Method and Description |
---|---|
String |
getDefaultSchema()
Returns the default schema.
|
protected List<String> |
getFieldAccessNames(ClassMetaData meta)
Return the list of fields in
meta that use field access,
or null if a list of fields is unobtainable. |
Member |
getMemberByProperty(ClassMetaData meta,
String property,
int access,
boolean applyDefaultRule)
Gets either the instance field or the getter method depending upon the
access style of the given meta-data.
|
static PersistenceStrategy |
getPersistenceStrategy(FieldMetaData fmd,
Member member)
Return the code for the strategy of the given member.
|
static PersistenceStrategy |
getPersistenceStrategy(FieldMetaData fmd,
Member member,
boolean ignoreTransient)
Return the code for the strategy of the given member.
|
List<Member> |
getPersistentMembers(ClassMetaData meta,
boolean ignoreTransient)
Gets the members that are backing members for attributes being persisted.
|
protected List<String> |
getPropertyAccessNames(ClassMetaData meta)
Return the list of methods in
meta that use property access,
or null if a list of methods is unobtainable. |
boolean |
isAbstractMappingUniDirectional(OpenJPAConfiguration conf)
Whether the relationship in MappedSuper class must be
uni-directional.
|
Boolean |
isDefaultCascadePersistEnabled()
Whether cascade-persist was declared in the persistence unit defaults.
|
protected boolean |
isDefaultPersistent(ClassMetaData meta,
Member member,
String name) |
protected boolean |
isDefaultPersistent(ClassMetaData meta,
Member member,
String name,
boolean ignoreTransient)
Return true if the given member is persistent by default.
|
boolean |
isNonDefaultMappingAllowed(OpenJPAConfiguration conf)
Whether non-default mapping is allowed.
|
void |
populate(ClassMetaData meta,
int access)
Populates the given class metadata.
|
void |
populate(ClassMetaData meta,
int access,
boolean ignoreTransient)
Populates the given class metadata.
|
protected void |
populate(FieldMetaData fmd) |
void |
setAbstractMappingUniDirectional(OpenJPAConfiguration conf) |
void |
setDefaultAccessType(String type)
Auto-configuration method for the default access type of base classes
with ACCESS_UNKNOWN
|
void |
setDefaultCascadePersistEnabled(Boolean bool) |
void |
setDefaultSchema(String schema)
Sets the default schema.
|
void |
setNonDefaultMappingAllowed(OpenJPAConfiguration conf) |
getBackingMember, getCallbackMode, getCallbacksBeforeListeners, getDefaultAccessType, getDefaultIdentityType, getFieldName, getIgnoreNonPersistent, getUnimplementedExceptionType, getUsePCRegistry, isBoolean, isBooleanGetter, isDataStoreObjectIdFieldUnwrapped, isDeclaredInterfacePersistent, isGetter, isNormalGetter, isReservedFieldName, isUserDefined, setCallbackMode, setCallbackMode, setDataStoreObjectIdFieldUnwrapped, setDeclaredInterfacePersistent, setDefaultAccessType, setDefaultIdentityType, setIgnoreNonPersistent, setUsePCRegistry, startsWith, toNames
protected org.apache.openjpa.persistence.PersistenceMetaDataDefaults.AccessFilter propertyAccessFilter
protected org.apache.openjpa.persistence.PersistenceMetaDataDefaults.AccessFilter fieldAccessFilter
protected org.apache.openjpa.persistence.PersistenceMetaDataDefaults.MemberFilter fieldFilter
protected org.apache.openjpa.persistence.PersistenceMetaDataDefaults.MemberFilter methodFilter
protected org.apache.openjpa.persistence.PersistenceMetaDataDefaults.TransientFilter nonTransientFilter
protected org.apache.openjpa.persistence.PersistenceMetaDataDefaults.AnnotatedFilter annotatedFilter
protected org.apache.openjpa.persistence.PersistenceMetaDataDefaults.GetterFilter getterFilter
protected org.apache.openjpa.persistence.PersistenceMetaDataDefaults.SetterFilter setterFilter
public static PersistenceStrategy getPersistenceStrategy(FieldMetaData fmd, Member member)
public static PersistenceStrategy getPersistenceStrategy(FieldMetaData fmd, Member member, boolean ignoreTransient)
public void setDefaultAccessType(String type)
public void populate(ClassMetaData meta, int access)
populate
in interface MetaDataDefaults
populate
in class AbstractMetaDataDefaults
access
- access type constant from ClassMetaData
determineAccessType(ClassMetaData)
public void populate(ClassMetaData meta, int access, boolean ignoreTransient)
populate
in interface MetaDataDefaults
populate
in class AbstractMetaDataDefaults
access
- access type constant from ClassMetaData
determineAccessType(ClassMetaData)
protected void populate(FieldMetaData fmd)
populate
in class AbstractMetaDataDefaults
public List<Member> getPersistentMembers(ClassMetaData meta, boolean ignoreTransient)
getPersistentMembers
in class AbstractMetaDataDefaults
protected List<String> getFieldAccessNames(ClassMetaData meta)
AbstractMetaDataDefaults
meta
that use field access,
or null
if a list of fields is unobtainable. An empty list
should be returned if the list of fields is obtainable, but there
happens to be no field access in meta
.
This is used for error reporting purposes only, so need not be efficient.
This implementation returns null
.getFieldAccessNames
in class AbstractMetaDataDefaults
protected List<String> getPropertyAccessNames(ClassMetaData meta)
AbstractMetaDataDefaults
meta
that use property access,
or null
if a list of methods is unobtainable. An empty list
should be returned if the list of methods is obtainable, but there
happens to be no property access in meta
.
This is used for error reporting purposes only, so need not be efficient.
This implementation returns null
.getPropertyAccessNames
in class AbstractMetaDataDefaults
protected boolean isDefaultPersistent(ClassMetaData meta, Member member, String name)
protected boolean isDefaultPersistent(ClassMetaData meta, Member member, String name, boolean ignoreTransient)
AbstractMetaDataDefaults
isDefaultPersistent
in class AbstractMetaDataDefaults
name
- the field name from AbstractMetaDataDefaults.getFieldName(java.lang.reflect.Member)
public Member getMemberByProperty(ClassMetaData meta, String property, int access, boolean applyDefaultRule)
meta
- is the declaring classproperty
- name of the logical attributeaccess
- whether to look for the field of getter method.
If unknown, then field or property is chosen based on the access type
used by the given class.applyDefaultRule
- if true and access is unknown then scans the
annotation on the member to determine access.public boolean isAbstractMappingUniDirectional(OpenJPAConfiguration conf)
MetaDataDefaults
public void setAbstractMappingUniDirectional(OpenJPAConfiguration conf)
public boolean isNonDefaultMappingAllowed(OpenJPAConfiguration conf)
MetaDataDefaults
public void setNonDefaultMappingAllowed(OpenJPAConfiguration conf)
public Boolean isDefaultCascadePersistEnabled()
MetaDataDefaults
public void setDefaultCascadePersistEnabled(Boolean bool)
public String getDefaultSchema()
MetaDataDefaults
public void setDefaultSchema(String schema)
MetaDataDefaults
Copyright © 2006–2017 Apache Software Foundation. All rights reserved.