org.hibernate.metamodel.relational
Class Index

java.lang.Object
  extended by org.hibernate.metamodel.relational.AbstractConstraint
      extended by org.hibernate.metamodel.relational.Index
All Implemented Interfaces:
Constraint, Exportable

public class Index
extends AbstractConstraint
implements Constraint

Models a SQL INDEX


Constructor Summary
protected Index(Table table, String name)
           
 
Method Summary
static String buildSqlCreateIndexString(Dialect dialect, String name, TableSpecification table, Iterable<Column> columns, boolean unique)
           
 String getExportIdentifier()
          Get a unique identifier to make sure we are not exporting the same database structure multiple times.
 String sqlConstraintStringInAlterTable(Dialect dialect)
           
 String[] sqlCreateStrings(Dialect dialect)
          Gets the SQL strings for creating the database object.
 String[] sqlDropStrings(Dialect dialect)
          Gets the SQL strings for dropping the database object.
 
Methods inherited from class org.hibernate.metamodel.relational.AbstractConstraint
addColumn, getColumns, getColumnSpan, getName, getTable, internalAddColumn, internalColumnAccess, isCreationVetoed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.hibernate.metamodel.relational.Constraint
getColumns, getName, getTable
 

Constructor Detail

Index

protected Index(Table table,
                String name)
Method Detail

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 interface Exportable
Returns:
The exporting identifier.

sqlCreateStrings

public String[] sqlCreateStrings(Dialect dialect)
Description copied from interface: Exportable
Gets the SQL strings for creating the database object.

Specified by:
sqlCreateStrings in interface Exportable
Overrides:
sqlCreateStrings in class AbstractConstraint
Parameters:
dialect - The dialect for which to generate the SQL creation strings
Returns:
the SQL strings for creating the database object.

buildSqlCreateIndexString

public static String buildSqlCreateIndexString(Dialect dialect,
                                               String name,
                                               TableSpecification table,
                                               Iterable<Column> columns,
                                               boolean unique)

sqlConstraintStringInAlterTable

public String sqlConstraintStringInAlterTable(Dialect dialect)
Specified by:
sqlConstraintStringInAlterTable in class AbstractConstraint

sqlDropStrings

public String[] sqlDropStrings(Dialect dialect)
Description copied from interface: Exportable
Gets the SQL strings for dropping the database object.

Specified by:
sqlDropStrings in interface Exportable
Overrides:
sqlDropStrings in class AbstractConstraint
Parameters:
dialect - The dialect for which to generate the SQL drop strings
Returns:
the SQL strings for dropping the database object.


Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.