Top Description Fields Constructors Methods
org.eclipse.persistence.internal.jpa.metadata.tables

public Class IndexMetadata

extends ORMetadata
Class Inheritance
Imports
java.util.ArrayList, .List, .StringTokenizer, org.eclipse.persistence.internal.helper.DatabaseTable, .StringHelper, org.eclipse.persistence.internal.jpa.metadata.MetadataDescriptor, .ORMetadata, org.eclipse.persistence.internal.jpa.metadata.accessors.MetadataAccessor, org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAnnotation, org.eclipse.persistence.tools.schemaframework.IndexDefinition

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.
Author
James Sutherland
Since
EclipseLink 2.2

Field Summary

Modifier and TypeField and Description
private static final char
FIELD_SEP

Name parts separator.

private static final String
INDEX

Name prefix.

private String
private String
private List<String>
private String
private String
private String
private Boolean
Inherited from org.eclipse.persistence.internal.jpa.metadata.ORMetadata:
m_project

Constructor Summary

AccessConstructor and Description
public
IndexMetadata()

INTERNAL: Used for OX mapping.

public

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object
the reference object with which to compare.
objectToCompare
)

Implements abstract org.eclipse.persistence.internal.jpa.metadata.ORMetadata.equals.

INTERNAL:
public String
getCatalog()

INTERNAL: Used for OX mapping.

public String
getColumnList()

INTERNAL: Used for OX mapping.

public List<String>
getColumnNames()

INTERNAL: Used for OX mapping.

protected String
getIdentifier()

Overrides org.eclipse.persistence.internal.jpa.metadata.ORMetadata.getIdentifier.

INTERNAL: Sub classes that can uniquely be identified must override this method to allow the overriding and merging to uniquely identify objects.
public String
getName()

INTERNAL: Used for OX mapping.

public String
getSchema()

INTERNAL: Used for OX mapping.

public String
getTable()

INTERNAL: Used for OX mapping.

public Boolean
getUnique()

INTERNAL: Used for OX mapping.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for the object.
protected boolean
hasName()

INTERNAL: Return true is a name has been specified for this index.

protected boolean
isUnique()

INTERNAL: Return true is there is a unique setting for this index.

public void
process(DatabaseTable table)

INTERNAL: Process the index metadata.

public void
process(MetadataDescriptor descriptor, String defaultColumnName)

INTERNAL: Process the index metadata.

protected String
processName(DatabaseTable table, IndexDefinition indexDefinition)

INTERNAL: Process the name.

public void
setCatalog(String catalog)

INTERNAL: Used for OX mapping.

public void
setColumnList(String columnList)

INTERNAL: Used for OX mapping.

public void
setColumnNames(List<String> columnNames)

INTERNAL: Used for OX mapping.

public void
setName(String name)

INTERNAL: Used for OX mapping.

public void
setSchema(String schema)

INTERNAL: Used for OX mapping.

public void
setTable(String table)

INTERNAL: Used for OX mapping.

public void
setUnique(Boolean unique)

INTERNAL: Used for OX mapping.

Inherited from org.eclipse.persistence.internal.jpa.metadata.ORMetadata:
getAccessibleObjectgetAccessibleObjectNamegetAnnotationgetBoxedTypegetDatabaseTypeEnumgetEntityMappingsgetFullyQualifiedClassNamegetJavaClassgetJavaClassNamegetLoadergetLocationgetLoggergetMetadataClassgetMetadataClassgetMetadataClassgetMetadataFactorygetNamegetPrimitiveClassForNamegetProjectgetTextgetXMLElementhasIdentifierhasTextinitXMLClassNameinitXMLObjectinitXMLObjectinitXMLObjectsinitXMLTextObjectloadedFromAnnotationloadedFromEclipseLinkXMLloadedFromXMLmergemergeORObjectListsmergeORObjectsmergeSimpleObjectsreloadEntityreloadMappedSuperclasssetAccessibleObjectsetEntityMappingssetFieldNamesetFieldNamesetProjectshouldOverridevaluesMatchvaluesMatch

Field Detail

FIELD_SEPback to summary
private static final char FIELD_SEP

Name parts separator.

INDEXback to summary
private static final String INDEX

Name prefix.

m_catalogback to summary
private String m_catalog
m_columnListback to summary
private String m_columnList
m_columnNamesback to summary
private List<String> m_columnNames
m_nameback to summary
private String m_name
m_schemaback to summary
private String m_schema
m_tableback to summary
private String m_table
m_uniqueback to summary
private Boolean m_unique

Constructor Detail

IndexMetadataback to summary
public IndexMetadata()

INTERNAL: Used for OX mapping.

IndexMetadataback to summary
public IndexMetadata(MetadataAnnotation index, MetadataAccessor accessor)

INTERNAL:

Method Detail

equalsback to summary
public boolean equals(Object objectToCompare)

Implements abstract org.eclipse.persistence.internal.jpa.metadata.ORMetadata.equals.

INTERNAL:

Parameters
objectToCompare:Object

Doc from java.lang.Object.equals.

the reference object with which to compare.

Returns:boolean

Doc from java.lang.Object.equals.

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getCatalogback to summary
public String getCatalog()

INTERNAL: Used for OX mapping.

getColumnListback to summary
public String getColumnList()

INTERNAL: Used for OX mapping.

getColumnNamesback to summary
public List<String> getColumnNames()

INTERNAL: Used for OX mapping.

getIdentifierback to summary
protected String getIdentifier()

Overrides org.eclipse.persistence.internal.jpa.metadata.ORMetadata.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.

Annotations
@Override
See Also
shouldOverride(ORMetadata), mergeORObjects(ORMetadata, ORMetadata), mergeORObjectLists(List, List)
getNameback to summary
public String getName()

INTERNAL: Used for OX mapping.

getSchemaback to summary
public String getSchema()

INTERNAL: Used for OX mapping.

getTableback to summary
public String getTable()

INTERNAL: Used for OX mapping.

getUniqueback to summary
public Boolean getUnique()

INTERNAL: Used for OX mapping.

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object.

Annotations
@Override
hasNameback to summary
protected boolean hasName()

INTERNAL: Return true is a name has been specified for this index.

isUniqueback to summary
protected boolean isUnique()

INTERNAL: Return true is there is a unique setting for this index.

processback to summary
public void process(DatabaseTable table)

INTERNAL: Process the index metadata. This is called from all table metadata. CollectionTable, SecondaryTable, JoinTable, Table, TableGenerator.

processback to summary
public void process(MetadataDescriptor descriptor, String defaultColumnName)

INTERNAL: Process the index metadata. This is called from EntityAccessor and BasicAccesor (for Basic, Id and Version)

processNameback to summary
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_.....

setCatalogback to summary
public void setCatalog(String catalog)

INTERNAL: Used for OX mapping.

setColumnListback to summary
public void setColumnList(String columnList)

INTERNAL: Used for OX mapping.

setColumnNamesback to summary
public void setColumnNames(List<String> columnNames)

INTERNAL: Used for OX mapping.

setNameback to summary
public void setName(String name)

INTERNAL: Used for OX mapping.

setSchemaback to summary
public void setSchema(String schema)

INTERNAL: Used for OX mapping.

setTableback to summary
public void setTable(String table)

INTERNAL: Used for OX mapping.

setUniqueback to summary
public void setUnique(Boolean unique)

INTERNAL: Used for OX mapping.