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 void
addColumn(Selectable selectable)
void
addColumn(Selectable selectable, String order)
void
addColumns(List<Column> extraColumns)
Deprecated, for removal: This API element is subject to removal in a future version.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 releasestatic 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 releasestatic 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 releaseboolean
containsColumn(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()
int
getColumnSpan()
String
getExportIdentifier()
Get a unique identifier to make sure we are not exporting the same database structure multiple times.String
getName()
String
getQuotedName(Dialect dialect)
Map<Selectable,String>
getSelectableOrderMap()
List<Selectable>
getSelectables()
Table
getTable()
boolean
isUnique()
void
setName(String name)
void
setTable(Table table)
void
setUnique(boolean unique)
String
toString()
-
-
-
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:Exportable
Get a unique identifier to make sure we are not exporting the same database structure multiple times.- Specified by:
getExportIdentifier
in interfaceExportable
- Returns:
- The exporting identifier.
-
-