Package org.hibernate.mapping
Class Index
- java.lang.Object
-
- org.hibernate.mapping.Index
-
- All Implemented Interfaces:
Serializable,Exportable
public class Index extends Object implements Exportable, Serializable
A mapping model object representing an index on a relational database table.We regularize the semantics of unique constraints on nullable columns: two null values are not considered to be "equal" for the purpose of determining uniqueness, just as specified by ANSI SQL and common sense.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Index()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddColumn(Selectable selectable)voidaddColumn(Selectable selectable, String order)voidaddColumns(List<Column> extraColumns)Deprecated, for removal: This API element is subject to removal in a future version.static StringbuildSqlCreateIndexString(SqlStringGenerationContext context, String name, Table table, List<Column> columns, Map<Column,String> columnOrderMap, boolean unique, Metadata metadata)Deprecated, for removal: This API element is subject to removal in a future version.This method will be removed in the next releasestatic StringbuildSqlCreateIndexString(Dialect dialect, String name, String tableName, List<Column> columns, Map<Column,String> columnOrderMap, boolean unique)Deprecated, for removal: This API element is subject to removal in a future version.This method will be removed in the next releasestatic StringbuildSqlDropIndexString(String name, String tableName)Deprecated, for removal: This API element is subject to removal in a future version.This method will be removed in the next releasebooleancontainsColumn(Column column)Deprecated, for removal: This API element is subject to removal in a future version.Map<Column,String>getColumnOrderMap()Deprecated.List<Column>getColumns()Deprecated.usegetSelectables()intgetColumnSpan()StringgetExportIdentifier()Get a unique identifier to make sure we are not exporting the same database structure multiple times.StringgetName()StringgetQuotedName(Dialect dialect)Map<Selectable,String>getSelectableOrderMap()List<Selectable>getSelectables()TablegetTable()booleanisUnique()voidsetName(String name)voidsetTable(Table table)voidsetUnique(boolean unique)StringtoString()
-
-
-
Method Detail
-
buildSqlDropIndexString
@Deprecated(forRemoval=true) public static String buildSqlDropIndexString(String name, String tableName)
Deprecated, for removal: This API element is subject to removal in a future version.This method will be removed in the next release
-
buildSqlCreateIndexString
@Deprecated(forRemoval=true) public static String buildSqlCreateIndexString(Dialect dialect, String name, String tableName, List<Column> columns, Map<Column,String> columnOrderMap, boolean unique)
Deprecated, for removal: This API element is subject to removal in a future version.This method will be removed in the next release
-
buildSqlCreateIndexString
@Deprecated(forRemoval=true) public static String buildSqlCreateIndexString(SqlStringGenerationContext context, String name, Table table, List<Column> columns, Map<Column,String> columnOrderMap, boolean unique, Metadata metadata)
Deprecated, for removal: This API element is subject to removal in a future version.This method will be removed in the next release
-
getTable
public Table getTable()
-
setTable
public void setTable(Table table)
-
setUnique
public void setUnique(boolean unique)
-
isUnique
public boolean isUnique()
-
getColumnSpan
public int getColumnSpan()
-
getSelectables
public List<Selectable> getSelectables()
-
getSelectableOrderMap
public Map<Selectable,String> getSelectableOrderMap()
-
getColumns
@Deprecated(since="6.3") public List<Column> getColumns()
Deprecated.usegetSelectables()
-
getColumnOrderMap
@Deprecated(since="6.3") public Map<Column,String> getColumnOrderMap()
Deprecated.
-
addColumn
public void addColumn(Selectable selectable)
-
addColumn
public void addColumn(Selectable selectable, String order)
-
addColumns
@Deprecated(since="6.3", forRemoval=true) public void addColumns(List<Column> extraColumns)
Deprecated, for removal: This API element is subject to removal in a future version.
-
containsColumn
@Deprecated(since="6.3", forRemoval=true) public boolean containsColumn(Column column)
Deprecated, for removal: This API element is subject to removal in a future version.
-
getName
public String getName()
-
setName
public void setName(String name)
-
getExportIdentifier
public String getExportIdentifier()
Description copied from interface:ExportableGet a unique identifier to make sure we are not exporting the same database structure multiple times.- Specified by:
getExportIdentifierin interfaceExportable- Returns:
- The exporting identifier.
-
-