org.datanucleus.metadata
Class IndexMetaData
java.lang.Object
org.datanucleus.metadata.MetaData
org.datanucleus.metadata.AbstractConstraintMetaData
org.datanucleus.metadata.IndexMetaData
- All Implemented Interfaces:
- java.io.Serializable, ColumnMetaDataContainer
public class IndexMetaData
- extends AbstractConstraintMetaData
- implements ColumnMetaDataContainer
For schema generation, it might be useful to specify that a column or columns
be indexed, and to provide the name of the index. For this purpose, an index
element can be contained within a field, element, key, value, or join
element, and this indicates that the column(s) associated with the referenced
element should be indexed. Indexes can also be specified at the class level,
by including index elements containing column elements. In this case, the
column elements are mapped elsewhere, and the column elements contain only
the column name.
- See Also:
- Serialized Form
| Methods inherited from class org.datanucleus.metadata.MetaData |
addExtension, addExtension, assertIfInitialised, getExtensions, getNoOfExtensions, getParent, getValueForExtension, getValuesForExtension, hasExtension, isInitialised, isPopulated, isUsed, newExtensionMetaData, removeExtension, setParent, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
IndexMetaData
public IndexMetaData(IndexMetaData imd)
- Constructor to create a copy of the passed metadata.
- Parameters:
imd - The metadata to copy
IndexMetaData
public IndexMetaData()
- Default constructor. Set fields using setters, before populate().
getName
public java.lang.String getName()
setName
public void setName(java.lang.String name)
getTable
public java.lang.String getTable()
setTable
public void setTable(java.lang.String table)
isUnique
public final boolean isUnique()
setUnique
public IndexMetaData setUnique(boolean unique)
setUnique
public IndexMetaData setUnique(java.lang.String unique)
toString
public java.lang.String toString(java.lang.String prefix,
java.lang.String indent)
- Returns a string representation of the object.
This can be used as part of a facility to output a MetaData file.
- Overrides:
toString in class MetaData
- Parameters:
prefix - prefix stringindent - indent string
- Returns:
- a string representation of the object.
Copyright © 2010. All Rights Reserved.