public class IndexType extends Object
Constructor and Description |
---|
IndexType() |
Modifier and Type | Method and Description |
---|---|
static IndexType |
createNonUnique(boolean persistent)
Create a non-unique index.
|
static IndexType |
createNonUnique(boolean persistent,
boolean hash)
Create a non-unique index.
|
static IndexType |
createPrimaryKey(boolean persistent,
boolean hash)
Create a primary key index.
|
static IndexType |
createScan(boolean persistent)
Create a scan pseudo-index.
|
static IndexType |
createUnique(boolean persistent,
boolean hash)
Create a unique index.
|
boolean |
getBelongsToConstraint()
If the index is created because of a constraint.
|
String |
getSQL()
Get the SQL snippet to create such an index.
|
boolean |
isHash()
Is this a hash index?
|
boolean |
isPersistent()
Is this index persistent?
|
boolean |
isPrimaryKey()
Does this index belong to a primary key constraint?
|
boolean |
isScan()
Is this a table scan pseudo-index?
|
boolean |
isUnique()
Is this a unique index?
|
void |
setBelongsToConstraint(boolean belongsToConstraint)
Sets if this index belongs to a constraint.
|
public static IndexType createPrimaryKey(boolean persistent, boolean hash)
persistent
- if the index is persistenthash
- if a hash index should be usedpublic static IndexType createUnique(boolean persistent, boolean hash)
persistent
- if the index is persistenthash
- if a hash index should be usedpublic static IndexType createNonUnique(boolean persistent)
persistent
- if the index is persistentpublic static IndexType createNonUnique(boolean persistent, boolean hash)
persistent
- if the index is persistenthash
- if a hash index should be usedpublic static IndexType createScan(boolean persistent)
persistent
- if the index is persistentpublic void setBelongsToConstraint(boolean belongsToConstraint)
belongsToConstraint
- if the index belongs to a constraintpublic boolean getBelongsToConstraint()
public boolean isHash()
public boolean isPersistent()
public boolean isPrimaryKey()
public boolean isUnique()
public String getSQL()
public boolean isScan()
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.