Class IndexDef
- java.lang.Object
-
- com.ibm.fhir.database.utils.model.IndexDef
-
public class IndexDef extends Object
Definition of an index on a table
-
-
Constructor Summary
Constructors Constructor Description IndexDef(String indexName, Collection<OrderedColumnDef> indexColumns, boolean unique)
IndexDef(String indexName, Collection<OrderedColumnDef> indexColumns, Collection<String> includeColumns)
Construct an index definition for a unique index with include columns.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
apply(String schemaName, String tableName, String tenantColumnName, IDatabaseAdapter target)
Apply this object to the given database targetCreateIndexStatement
createStatement(String schemaName, String tableName, String tenantColumnName)
Create a statement which can be used to create vendor-specific DDLvoid
drop(String schemaName, IDatabaseAdapter target)
Drop this indexboolean
isUnique()
Getter for the unique flagString
toString()
-
-
-
Constructor Detail
-
IndexDef
public IndexDef(String indexName, Collection<OrderedColumnDef> indexColumns, boolean unique)
-
IndexDef
public IndexDef(String indexName, Collection<OrderedColumnDef> indexColumns, Collection<String> includeColumns)
Construct an index definition for a unique index with include columns. Note that it only makes sense for an index with include columns to be unique, so the unique flag is set true- Parameters:
indexName
-indexColumns
-includeColumns
-
-
-
Method Detail
-
isUnique
public boolean isUnique()
Getter for the unique flag- Returns:
-
apply
public void apply(String schemaName, String tableName, String tenantColumnName, IDatabaseAdapter target)
Apply this object to the given database target- Parameters:
tableName
-target
-
-
drop
public void drop(String schemaName, IDatabaseAdapter target)
Drop this index- Parameters:
schemaName
-target
-
-
createStatement
public CreateIndexStatement createStatement(String schemaName, String tableName, String tenantColumnName)
Create a statement which can be used to create vendor-specific DDL- Parameters:
schemaName
-tableName
-tenantColumnName
-- Returns:
-
-