Module org.eclipse.persistence.jpa
Class IndexMetadata
- java.lang.Object
-
- org.eclipse.persistence.internal.jpa.metadata.ORMetadata
-
- org.eclipse.persistence.internal.jpa.metadata.tables.IndexMetadata
-
public class IndexMetadata extends ORMetadata
INTERNAL: Object to hold onto database index metadata. 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 2.2
- Author:
- James Sutherland
-
-
Field Summary
-
Fields inherited from class org.eclipse.persistence.internal.jpa.metadata.ORMetadata
m_project
-
-
Constructor Summary
Constructors Constructor Description IndexMetadata()INTERNAL: Used for OX mapping.IndexMetadata(MetadataAnnotation index, MetadataAccessor accessor)INTERNAL:
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object objectToCompare)INTERNAL:StringgetCatalog()INTERNAL: Used for OX mapping.StringgetColumnList()INTERNAL: Used for OX mapping.List<String>getColumnNames()INTERNAL: Used for OX mapping.protected StringgetIdentifier()INTERNAL: Sub classes that can uniquely be identified must override this method to allow the overriding and merging to uniquely identify objects.StringgetName()INTERNAL: Used for OX mapping.StringgetSchema()INTERNAL: Used for OX mapping.StringgetTable()INTERNAL: Used for OX mapping.BooleangetUnique()INTERNAL: Used for OX mapping.inthashCode()protected booleanhasName()INTERNAL: Return true is a name has been specified for this index.protected booleanisUnique()INTERNAL: Return true is there is a unique setting for this index.voidprocess(DatabaseTable table)INTERNAL: Process the index metadata.voidprocess(MetadataDescriptor descriptor, String defaultColumnName)INTERNAL: Process the index metadata.protected StringprocessName(DatabaseTable table, IndexDefinition indexDefinition)INTERNAL: Process the name.voidsetCatalog(String catalog)INTERNAL: Used for OX mapping.voidsetColumnList(String columnList)INTERNAL: Used for OX mapping.voidsetColumnNames(List<String> columnNames)INTERNAL: Used for OX mapping.voidsetName(String name)INTERNAL: Used for OX mapping.voidsetSchema(String schema)INTERNAL: Used for OX mapping.voidsetTable(String table)INTERNAL: Used for OX mapping.voidsetUnique(Boolean unique)INTERNAL: Used for OX mapping.-
Methods inherited from class org.eclipse.persistence.internal.jpa.metadata.ORMetadata
getAccessibleObject, getAccessibleObjectName, getAnnotation, getBoxedType, getDatabaseTypeEnum, getEntityMappings, getFullyQualifiedClassName, 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
-
IndexMetadata
public IndexMetadata()
INTERNAL: Used for OX mapping.
-
IndexMetadata
public IndexMetadata(MetadataAnnotation index, MetadataAccessor accessor)
INTERNAL:
-
-
Method Detail
-
equals
public boolean equals(Object objectToCompare)
INTERNAL:- Specified by:
equalsin classORMetadata
-
getCatalog
public String getCatalog()
INTERNAL: Used for OX mapping.
-
getColumnList
public String getColumnList()
INTERNAL: Used for OX mapping.
-
getIdentifier
protected String getIdentifier()
INTERNAL: Sub classes that can uniquely be identified must override this method to allow the overriding and merging to uniquely identify objects. It will also be used when logging messages, that is, to provide a more detailed message.
-
getName
public String getName()
INTERNAL: Used for OX mapping.
-
getSchema
public String getSchema()
INTERNAL: Used for OX mapping.
-
getTable
public String getTable()
INTERNAL: Used for OX mapping.
-
getUnique
public Boolean getUnique()
INTERNAL: Used for OX mapping.
-
hasName
protected boolean hasName()
INTERNAL: Return true is a name has been specified for this index.
-
isUnique
protected boolean isUnique()
INTERNAL: Return true is there is a unique setting for this index.
-
process
public void process(DatabaseTable table)
INTERNAL: Process the index metadata. This is called from all table metadata. CollectionTable, SecondaryTable, JoinTable, Table, TableGenerator.
-
process
public void process(MetadataDescriptor descriptor, String defaultColumnName)
INTERNAL: Process the index metadata. This is called from EntityAccessor and BasicAccesor (for Basic, Id and Version)
-
processName
protected String processName(DatabaseTable table, IndexDefinition indexDefinition)
INTERNAL: Process the name. If specified it, use it, otherwise create a default. e.g. INDEX_tablename_field1_field2_.....
-
setCatalog
public void setCatalog(String catalog)
INTERNAL: Used for OX mapping.
-
setColumnList
public void setColumnList(String columnList)
INTERNAL: Used for OX mapping.
-
setName
public void setName(String name)
INTERNAL: Used for OX mapping.
-
setSchema
public void setSchema(String schema)
INTERNAL: Used for OX mapping.
-
setTable
public void setTable(String table)
INTERNAL: Used for OX mapping.
-
setUnique
public void setUnique(Boolean unique)
INTERNAL: Used for OX mapping.
-
-