Package org.hibernate.mapping
Class Index
java.lang.Object
org.hibernate.mapping.Index
- All Implemented Interfaces:
Serializable
,Exportable
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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
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.Deprecated.Deprecated.usegetSelectables()
int
Get a unique identifier to make sure we are not exporting the same database structure multiple times.getName()
getQuotedName
(Dialect dialect) getTable()
boolean
isUnique()
void
void
void
setUnique
(boolean unique) toString()
-
Constructor Details
-
Index
public Index()
-
-
Method Details
-
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
-
setTable
-
setUnique
public void setUnique(boolean unique) -
isUnique
public boolean isUnique() -
getColumnSpan
public int getColumnSpan() -
getSelectables
-
getSelectableOrderMap
-
getColumns
Deprecated.usegetSelectables()
-
getColumnOrderMap
Deprecated. -
addColumn
-
addColumn
-
addColumns
Deprecated, for removal: This API element is subject to removal in a future version. -
containsColumn
Deprecated, for removal: This API element is subject to removal in a future version. -
getName
-
setName
-
getQuotedName
-
toString
-
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.
-
getSelectableOrderMap()