public class AnnotationPersistenceMappingParser extends AnnotationPersistenceMetaDataParser
Modifier and Type | Field and Description |
---|---|
protected static int |
FALSE |
protected static int |
TRUE |
_cls, _stack
MODE_ALL, MODE_ANN_MAPPING, MODE_MAPPING, MODE_MAPPING_INIT, MODE_META, MODE_NONE, MODE_QUERY
Constructor and Description |
---|
AnnotationPersistenceMappingParser(JDBCConfiguration conf) |
Modifier and Type | Method and Description |
---|---|
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,
javax.persistence.CollectionTable ctbl)
Parse @CollectionTable.
|
protected void |
parseColumns(FieldMapping fm,
javax.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 |
parseLobMapping(FieldMetaData fmd)
Setup the field as a LOB mapping.
|
protected void |
parseMapKeyColumn(FieldMapping fm,
javax.persistence.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 void |
setTargetIdentifier(Column col,
String refColumnName) |
protected static int |
toPolymorphicConstant(NonpolymorphicType val)
Return the
ValueMapping POLY_* constant for
the given enum value. |
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
protected static final int TRUE
protected static final int FALSE
public AnnotationPersistenceMappingParser(JDBCConfiguration conf)
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)
protected void parseForeignKey(MappingInfo info, String name, boolean enabled, boolean deferred, ForeignKeyAction deleteAction, ForeignKeyAction updateAction)
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, javax.persistence.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, javax.persistence.CollectionTable ctbl)
protected void parseElementJoinColumns(FieldMapping fm, ElementJoinColumn... joins)
protected void parseMapKeyColumn(FieldMapping fm, javax.persistence.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
Copyright © 2006–2020 Apache Software Foundation. All rights reserved.