Class AnnotationPersistenceMappingParser
java.lang.Object
org.apache.openjpa.persistence.AnnotationPersistenceMetaDataParser
org.apache.openjpa.persistence.jdbc.AnnotationPersistenceMappingParser
- All Implemented Interfaces:
MetaDataModes
Persistence annotation mapping parser.
- Author:
- Pinaki Poddar, Steve Kim, Abe White
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final int
protected static final int
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
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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
static ClassMapping
getEmbeddedMapping
(ValueMapping val, boolean createNew) protected boolean
Allow subclasses to handle unknown annotations.protected boolean
Allow subclasses to handle unknown annotations.protected boolean
Allow subclasses to handle unknown annotations.protected String
normalizeCatalogName
(String catName) protected String
normalizeSchemaName
(String schName) protected String
normalizeSequenceName
(String seqName) protected void
Parse class mapping annotations.protected void
parseCollectionTable
(FieldMapping fm, jakarta.persistence.CollectionTable ctbl) Parse @CollectionTable.protected void
parseColumns
(FieldMapping fm, jakarta.persistence.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
Setup the field as a LOB mapping.protected void
parseMapKeyColumn
(FieldMapping fm, jakarta.persistence.MapKeyColumn anno) Parse @MapKeyColumn.protected void
Parse member mapping components.protected void
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 forfm
.protected void
setMapKeyColumn
(FieldMapping fm, MappingInfo info, Column col, int unique) Set the given map key column as the map key column forfm
.protected void
setTargetIdentifier
(Column col, String refColumnName) protected static int
Return theValueMapping
POLY_*
constant for the given enum value.Methods inherited from class org.apache.openjpa.persistence.AnnotationPersistenceMetaDataParser
addHints, addSourceInfo, clear, getConfiguration, getEnvClassLoader, getLog, getMappingOverride, getMode, getRepository, getSourceFile, handleUnknownClassAnnotation, handleUnknownMemberAnnotation, handleUnknownPackageAnnotation, isMappingMode, isMappingOverrideMode, isMetaDataMode, isQueryMode, parse, parseCallbackMethods, setEnvClassLoader, setMappingOverride, setMode, setMode, setRepository, toKernelParameterMode, toOverrideType
-
Field Details
-
TRUE
protected static final int TRUE- See Also:
-
FALSE
protected static final int FALSE- See Also:
-
-
Constructor Details
-
AnnotationPersistenceMappingParser
-
-
Method Details
-
parsePackageMappingAnnotations
Description copied from class:AnnotationPersistenceMetaDataParser
Parse package mapping annotations.- Overrides:
parsePackageMappingAnnotations
in classAnnotationPersistenceMetaDataParser
-
handleUnknownPackageMappingAnnotation
Allow subclasses to handle unknown annotations. -
parseClassMappingAnnotations
Description copied from class:AnnotationPersistenceMetaDataParser
Parse class mapping annotations.- Overrides:
parseClassMappingAnnotations
in classAnnotationPersistenceMetaDataParser
-
handleUnknownClassMappingAnnotation
Allow subclasses to handle unknown annotations. -
parseForeignKey
protected void parseForeignKey(MappingInfo info, String name, boolean enabled, boolean deferred, ForeignKeyAction deleteAction, ForeignKeyAction updateAction) Set foreign key data on the given mapping info. -
parseIndex
Set index data on the given mapping info. -
parseLobMapping
Description copied from class:AnnotationPersistenceMetaDataParser
Setup the field as a LOB mapping.- Overrides:
parseLobMapping
in classAnnotationPersistenceMetaDataParser
-
parseMemberMappingAnnotations
Description copied from class:AnnotationPersistenceMetaDataParser
Parse member mapping components.- Overrides:
parseMemberMappingAnnotations
in classAnnotationPersistenceMetaDataParser
-
handleUnknownMemberMappingAnnotation
Allow subclasses to handle unknown annotations. -
toPolymorphicConstant
Return theValueMapping
POLY_*
constant for the given enum value. -
getEmbeddedFieldMapping
-
getEmbeddedFieldMapping
public static FieldMapping getEmbeddedFieldMapping(FieldMapping fm, String attrName, boolean mustExist) -
getEmbeddedClassType
-
getEmbeddedMapping
-
getEmbeddedMapping
-
getAttributeOverrideField
public static FieldMapping getAttributeOverrideField(String attrName, FieldMapping fm, ClassMapping embed) -
parseColumns
Parse @Column(s). -
setColumns
Set the given columns as the columns forfm
.- Parameters:
unique
- bitwise combination of TRUE and FALSE for the unique attribute of each column
-
setTargetIdentifier
-
parseXJoinColumns
protected void parseXJoinColumns(FieldMapping fm, MappingInfo info, boolean secondaryAllowed, XJoinColumn... joins) Parse given @XJoinColumn annotations. -
parseContainerTable
Parse @ContainerTable. -
parseCollectionTable
Parse @CollectionTable. -
parseElementJoinColumns
Parse @ElementJoinColumn(s). -
parseMapKeyColumn
Parse @MapKeyColumn. -
setMapKeyColumn
Set the given map key column as the map key column forfm
.- Parameters:
unique
- bitwise combination of TRUE and FALSE for the unique attribute of the column
-
normalizeSequenceName
- Overrides:
normalizeSequenceName
in classAnnotationPersistenceMetaDataParser
-
normalizeSchemaName
- Overrides:
normalizeSchemaName
in classAnnotationPersistenceMetaDataParser
-
normalizeCatalogName
- Overrides:
normalizeCatalogName
in classAnnotationPersistenceMetaDataParser
-