Top Description Fields Constructors Methods
org.hibernate.mapping

public Class Index

extends Object
implements Exportable, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, org.hibernate.boot.model.relational.Exportable
Imports
java.io.Serializable, java.util.ArrayList, .HashMap, .List, .Map, org.hibernate.boot.Metadata, org.hibernate.boot.model.naming.Identifier, org.hibernate.boot.model.relational.Exportable, .SqlStringGenerationContext, org.hibernate.dialect.Dialect

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.

Author
Gavin King

Field Summary

Modifier and TypeField and Description
private Identifier
private final Map<Selectable, String>
private final List<Selectable>
private Table
private boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addColumn(Selectable selectable)

public void
addColumn(Selectable selectable, String order)

public void
addColumns(List<Column> extraColumns)

Deprecated for removal since 6.3. use getSelectableOrderMap()
public static String
buildSqlCreateIndexString(Dialect dialect, String name, String tableName, List<Column> columns, Map<Column, String> columnOrderMap, boolean unique)

Deprecated for removal. This method will be removed in the next release
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 method will be removed in the next release
public static String
buildSqlDropIndexString(String name, String tableName)

Deprecated for removal. This method will be removed in the next release
public boolean
containsColumn(Column column)

Deprecated for removal since 6.3. use getSelectableOrderMap()
public Map<Column, String>
getColumnOrderMap()

Deprecated since 6.3. use getSelectableOrderMap()
public List<Column>
getColumns()

Deprecated since 6.3. use getSelectables()
public int
public String
getExportIdentifier()

Implements org.hibernate.boot.model.relational.Exportable.getExportIdentifier.

Get a unique identifier to make sure we are not exporting the same database structure multiple times.
public String
public String
public Map<Selectable, String>
public List<Selectable>
public Table
public boolean
public void
public void
setTable(Table table)

public void
setUnique(boolean unique)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

nameback to summary
private Identifier name
selectableOrderMapback to summary
private final Map<Selectable, String> selectableOrderMap
selectablesback to summary
private final List<Selectable> selectables
tableback to summary
private Table table
uniqueback to summary
private boolean unique

Constructor Detail

Indexback to summary
public Index()

Method Detail

addColumnback to summary
public void addColumn(Selectable selectable)
addColumnback to summary
public void addColumn(Selectable selectable, String order)
addColumnsback to summary
public void addColumns(List<Column> extraColumns)

Deprecated

for removal since 6.3.

use getSelectableOrderMap()

Annotations
@Deprecated
since:6.3
forRemoval:true
buildSqlCreateIndexStringback to summary
public static String buildSqlCreateIndexString(Dialect dialect, String name, String tableName, List<Column> columns, Map<Column, String> columnOrderMap, boolean unique)

Deprecated

for removal.

This method will be removed in the next release

Annotations
@Deprecated
forRemoval:true
buildSqlCreateIndexStringback to summary
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 method will be removed in the next release

Annotations
@Deprecated
forRemoval:true
buildSqlDropIndexStringback to summary
public static String buildSqlDropIndexString(String name, String tableName)

Deprecated

for removal.

This method will be removed in the next release

Annotations
@Deprecated
forRemoval:true
containsColumnback to summary
public boolean containsColumn(Column column)

Deprecated

for removal since 6.3.

use getSelectableOrderMap()

Annotations
@Deprecated
since:6.3
forRemoval:true
getColumnOrderMapback to summary
public Map<Column, String> getColumnOrderMap()

Deprecated

since 6.3.

use getSelectableOrderMap()

Annotations
@Deprecated
since:6.3
getColumnsback to summary
public List<Column> getColumns()

Deprecated

since 6.3.

use getSelectables()

Annotations
@Deprecated
since:6.3
getColumnSpanback to summary
public int getColumnSpan()
getExportIdentifierback to summary
public String getExportIdentifier()

Implements org.hibernate.boot.model.relational.Exportable.getExportIdentifier.

Doc from org.hibernate.boot.model.relational.Exportable.getExportIdentifier.

Get a unique identifier to make sure we are not exporting the same database structure multiple times.

Returns:String

The exporting identifier.

Annotations
@Override
getNameback to summary
public String getName()
getQuotedNameback to summary
public String getQuotedName(Dialect dialect)
getSelectableOrderMapback to summary
public Map<Selectable, String> getSelectableOrderMap()
getSelectablesback to summary
public List<Selectable> getSelectables()
getTableback to summary
public Table getTable()
isUniqueback to summary
public boolean isUnique()
setNameback to summary
public void setName(String name)
setTableback to summary
public void setTable(Table table)
setUniqueback to summary
public void setUnique(boolean unique)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override