|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.persistence.AnnotationPersistenceMetaDataParser org.apache.openjpa.persistence.jdbc.AnnotationPersistenceMappingParser
public class AnnotationPersistenceMappingParser
Persistence annotation mapping parser.
Field Summary | |
---|---|
protected static int |
FALSE
|
protected static int |
TRUE
|
Fields inherited from class org.apache.openjpa.persistence.AnnotationPersistenceMetaDataParser |
---|
_cls, _stack |
Fields inherited from interface org.apache.openjpa.meta.MetaDataModes |
---|
MODE_ALL, MODE_ANN_MAPPING, MODE_MAPPING, MODE_MAPPING_INIT, MODE_META, MODE_NONE, MODE_QUERY |
Constructor Summary | |
---|---|
AnnotationPersistenceMappingParser(JDBCConfiguration conf)
|
Method Summary | |
---|---|
(package private) void |
addUniqueConstraints(String table,
MetaDataContext ctx,
MappingInfo info,
UniqueConstraint... uniqueConstraints)
|
(package private) void |
assertDefault(ForeignKey fk)
|
(package private) Unique |
createUniqueConstraint(MetaDataContext ctx,
UniqueConstraint anno)
|
static FieldMapping |
getAttributeOverrideField(String attrName,
FieldMapping fm,
ClassMapping embed)
|
static Class<?> |
getEmbeddedClassType(FieldMapping fm,
String attrName)
|
static FieldMapping |
getEmbeddedFieldMapping(FieldMapping fm,
String attrName)
|
static FieldMapping |
getEmbeddedFieldMapping(FieldMapping fm,
String attrName,
boolean mustExist)
|
static ClassMapping |
getEmbeddedMapping(ValueMapping val)
|
static ClassMapping |
getEmbeddedMapping(ValueMapping val,
boolean createNew)
|
protected boolean |
handleUnknownClassMappingAnnotation(ClassMapping cls,
Annotation anno)
Allow subclasses to handle unknown annotations. |
protected boolean |
handleUnknownMemberMappingAnnotation(FieldMapping fm,
Annotation anno)
Allow subclasses to handle unknown annotations. |
protected boolean |
handleUnknownPackageMappingAnnotation(Package pkg,
Annotation anno)
Allow subclasses to handle unknown annotations. |
protected String |
normalizeCatalogName(String catName)
|
protected String |
normalizeSchemaName(String schName)
|
protected String |
normalizeSequenceName(String seqName)
|
protected void |
parseClassMappingAnnotations(ClassMetaData meta)
Parse class mapping annotations. |
protected void |
parseCollectionTable(FieldMapping fm,
CollectionTable ctbl)
Parse @CollectionTable. |
protected void |
parseColumns(FieldMapping fm,
Column... pcols)
Parse @Column(s). |
protected void |
parseContainerTable(FieldMapping fm,
ContainerTable ctbl)
Parse @ContainerTable. |
protected void |
parseElementJoinColumns(FieldMapping fm,
ElementJoinColumn... joins)
Parse @ElementJoinColumn(s). |
protected void |
parseForeignKey(MappingInfo info,
String name,
boolean enabled,
boolean deferred,
ForeignKeyAction deleteAction,
ForeignKeyAction updateAction)
Set foreign key data on the given mapping info. |
protected void |
parseIndex(MappingInfo info,
String name,
boolean enabled,
boolean unique)
Set index data on the given mapping info. |
protected void |
parseLobMapping(FieldMetaData fmd)
Setup the field as a LOB mapping. |
protected void |
parseMapKeyColumn(FieldMapping fm,
MapKeyColumn anno)
Parse @MapKeyColumn. |
protected void |
parseMemberMappingAnnotations(FieldMetaData fmd)
Parse member mapping components. |
protected void |
parsePackageMappingAnnotations(Package pkg)
Parse package mapping annotations. |
protected void |
parseXJoinColumns(FieldMapping fm,
MappingInfo info,
boolean secondaryAllowed,
XJoinColumn... joins)
Parse given @XJoinColumn annotations. |
protected void |
setColumns(FieldMapping fm,
MappingInfo info,
List<Column> cols,
int unique)
Set the given columns as the columns for fm . |
protected void |
setMapKeyColumn(FieldMapping fm,
MappingInfo info,
Column col,
int unique)
Set the given map key column as the map key column for fm . |
protected static int |
toPolymorphicConstant(NonpolymorphicType val)
Return the ValueMapping POLY_* constant for
the given enum value. |
Methods inherited from class org.apache.openjpa.persistence.AnnotationPersistenceMetaDataParser |
---|
clear, getConfiguration, getEnvClassLoader, getLog, getMappingOverride, getMode, getRepository, getSourceFile, handleUnknownClassAnnotation, handleUnknownMemberAnnotation, handleUnknownPackageAnnotation, isMappingMode, isMappingOverrideMode, isMetaDataMode, isQueryMode, parse, parseCallbackMethods, setEnvClassLoader, setMappingOverride, setMode, setMode, setRepository, toOverrideType |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int TRUE
protected static final int FALSE
Constructor Detail |
---|
public AnnotationPersistenceMappingParser(JDBCConfiguration conf)
Method Detail |
---|
protected void parsePackageMappingAnnotations(Package pkg)
AnnotationPersistenceMetaDataParser
parsePackageMappingAnnotations
in class AnnotationPersistenceMetaDataParser
protected boolean handleUnknownPackageMappingAnnotation(Package pkg, Annotation anno)
protected void parseClassMappingAnnotations(ClassMetaData meta)
AnnotationPersistenceMetaDataParser
parseClassMappingAnnotations
in class AnnotationPersistenceMetaDataParser
protected boolean handleUnknownClassMappingAnnotation(ClassMapping cls, Annotation anno)
Unique createUniqueConstraint(MetaDataContext ctx, UniqueConstraint anno)
void addUniqueConstraints(String table, MetaDataContext ctx, MappingInfo info, UniqueConstraint... uniqueConstraints)
protected void parseForeignKey(MappingInfo info, String name, boolean enabled, boolean deferred, ForeignKeyAction deleteAction, ForeignKeyAction updateAction)
void assertDefault(ForeignKey fk)
protected void parseIndex(MappingInfo info, String name, boolean enabled, boolean unique)
protected void parseLobMapping(FieldMetaData fmd)
AnnotationPersistenceMetaDataParser
parseLobMapping
in class AnnotationPersistenceMetaDataParser
protected void parseMemberMappingAnnotations(FieldMetaData fmd)
AnnotationPersistenceMetaDataParser
parseMemberMappingAnnotations
in class AnnotationPersistenceMetaDataParser
protected boolean handleUnknownMemberMappingAnnotation(FieldMapping fm, Annotation anno)
protected static int toPolymorphicConstant(NonpolymorphicType val)
ValueMapping
POLY_*
constant for
the given enum value.
public static FieldMapping getEmbeddedFieldMapping(FieldMapping fm, String attrName)
public static FieldMapping getEmbeddedFieldMapping(FieldMapping fm, String attrName, boolean mustExist)
public static Class<?> getEmbeddedClassType(FieldMapping fm, String attrName)
public static ClassMapping getEmbeddedMapping(ValueMapping val, boolean createNew)
public static ClassMapping getEmbeddedMapping(ValueMapping val)
public static FieldMapping getAttributeOverrideField(String attrName, FieldMapping fm, ClassMapping embed)
protected void parseColumns(FieldMapping fm, Column... pcols)
protected void setColumns(FieldMapping fm, MappingInfo info, List<Column> cols, int unique)
fm
.
unique
- bitwise combination of TRUE and FALSE for the
unique attribute of each columnprotected void parseXJoinColumns(FieldMapping fm, MappingInfo info, boolean secondaryAllowed, XJoinColumn... joins)
protected void parseContainerTable(FieldMapping fm, ContainerTable ctbl)
protected void parseCollectionTable(FieldMapping fm, CollectionTable ctbl)
protected void parseElementJoinColumns(FieldMapping fm, ElementJoinColumn... joins)
protected void parseMapKeyColumn(FieldMapping fm, MapKeyColumn anno)
protected void setMapKeyColumn(FieldMapping fm, MappingInfo info, Column col, int unique)
fm
.
unique
- bitwise combination of TRUE and FALSE for the
unique attribute of the columnprotected String normalizeSequenceName(String seqName)
normalizeSequenceName
in class AnnotationPersistenceMetaDataParser
protected String normalizeSchemaName(String schName)
normalizeSchemaName
in class AnnotationPersistenceMetaDataParser
protected String normalizeCatalogName(String catName)
normalizeCatalogName
in class AnnotationPersistenceMetaDataParser
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |