Module org.eclipse.persistence.jpa
Class RelationalColumnMetadata
- java.lang.Object
-
- org.eclipse.persistence.internal.jpa.metadata.ORMetadata
-
- org.eclipse.persistence.internal.jpa.metadata.columns.MetadataColumn
-
- org.eclipse.persistence.internal.jpa.metadata.columns.RelationalColumnMetadata
-
- Direct Known Subclasses:
JoinColumnMetadata,PrimaryKeyJoinColumnMetadata
public abstract class RelationalColumnMetadata extends MetadataColumn
INTERNAL: Object to process JPA relational type colummns into EclipseLink database fields. Key notes: - any metadata mapped from XML to this class must be compared in the equals method. - when loading from annotations, the constructor accepts the metadata accessor this metadata was loaded from. Used it to look up any 'companion' annotation needed for processing. - methods should be preserved in alphabetical order.- Since:
- EclipseLink 1.2
- Author:
- Guy Pelletier
-
-
Field Summary
-
Fields inherited from class org.eclipse.persistence.internal.jpa.metadata.ORMetadata
m_project
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedRelationalColumnMetadata(String xmlElement)INTERNAL: Used for XML loading.RelationalColumnMetadata(MetadataAnnotation relationalColumn, MetadataAccessor accessor)INTERNAL: Used for annotation loading.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object objectToCompare)INTERNAL:ForeignKeyMetadatagetForeignKey()INTERNAL: Used for OX mapping.protected DatabaseFieldgetForeignKeyField()INTERNAL:DatabaseFieldgetForeignKeyField(DatabaseField primaryKeyField)INTERNAL: By calling this method we will return the foreign key field with the extra metadata from the primary key field that can not be applied to a referenced column.StringgetReferencedColumnName()INTERNAL: Used for OX mapping.booleanhasForeignKey()INTERNAL: Return true if a foreign key has been defined on this column.inthashCode()booleanisForeignKeyFieldNotSpecified()INTERNAL:booleanisPrimaryKeyFieldNotSpecified()INTERNAL:voidsetForeignKey(ForeignKeyMetadata foreignKey)INTERNAL: Used for OX mapping.voidsetReferencedColumnName(String referencedColumnName)INTERNAL: Used for OX mapping.-
Methods inherited from class org.eclipse.persistence.internal.jpa.metadata.columns.MetadataColumn
getColumnDefinition, getDatabaseField, getName, setColumnDefinition, setName
-
Methods inherited from class org.eclipse.persistence.internal.jpa.metadata.ORMetadata
getAccessibleObject, getAccessibleObjectName, getAnnotation, getBoxedType, getDatabaseTypeEnum, getEntityMappings, getFullyQualifiedClassName, getIdentifier, getJavaClass, getJavaClassName, getLoader, getLocation, getLogger, getMetadataClass, getMetadataClass, getMetadataClass, getMetadataFactory, getName, getPrimitiveClassForName, getProject, getText, getXMLElement, hasIdentifier, hasText, initXMLClassName, initXMLObject, initXMLObject, initXMLObjects, initXMLTextObject, loadedFromAnnotation, loadedFromEclipseLinkXML, loadedFromXML, merge, mergeORObjectLists, mergeORObjects, mergeSimpleObjects, reloadEntity, reloadMappedSuperclass, setAccessibleObject, setEntityMappings, setFieldName, setFieldName, setProject, shouldOverride, valuesMatch, valuesMatch
-
-
-
-
Constructor Detail
-
RelationalColumnMetadata
public RelationalColumnMetadata(MetadataAnnotation relationalColumn, MetadataAccessor accessor)
INTERNAL: Used for annotation loading.
-
RelationalColumnMetadata
protected RelationalColumnMetadata(String xmlElement)
INTERNAL: Used for XML loading.
-
-
Method Detail
-
equals
public boolean equals(Object objectToCompare)
INTERNAL:- Overrides:
equalsin classMetadataColumn
-
hashCode
public int hashCode()
- Overrides:
hashCodein classMetadataColumn
-
getForeignKey
public ForeignKeyMetadata getForeignKey()
INTERNAL: Used for OX mapping.
-
getForeignKeyField
protected DatabaseField getForeignKeyField()
INTERNAL:
-
getForeignKeyField
public DatabaseField getForeignKeyField(DatabaseField primaryKeyField)
INTERNAL: By calling this method we will return the foreign key field with the extra metadata from the primary key field that can not be applied to a referenced column.
-
getReferencedColumnName
public String getReferencedColumnName()
INTERNAL: Used for OX mapping.
-
hasForeignKey
public boolean hasForeignKey()
INTERNAL: Return true if a foreign key has been defined on this column.
-
isForeignKeyFieldNotSpecified
public boolean isForeignKeyFieldNotSpecified()
INTERNAL:
-
isPrimaryKeyFieldNotSpecified
public boolean isPrimaryKeyFieldNotSpecified()
INTERNAL:
-
setForeignKey
public void setForeignKey(ForeignKeyMetadata foreignKey)
INTERNAL: Used for OX mapping.
-
setReferencedColumnName
public void setReferencedColumnName(String referencedColumnName)
INTERNAL: Used for OX mapping.
-
-