public class IndexDefinition
extends java.lang.Object
Constructor and Description |
---|
IndexDefinition(java.sql.Connection connection,
java.lang.String tbname)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addFirstKey(java.lang.String column,
boolean ascending)
Add a column to the beginning of the key list
|
void |
addKey(java.lang.String column)
Add a column to the index definition.
|
void |
addKey(java.lang.String column,
boolean ascending)
Add a column to the end of the key list
|
static java.util.List<IndexDefinition> |
fetchIndexDefinition(java.sql.Connection connection,
java.lang.String whereClause)
Returns the definitions of indexes found with the where clause on the MaxSysIndexes table.
|
java.lang.String |
getIndexName()
Returns the index's name, if given at this point.
|
java.lang.Object |
getKeyDef()
Get the keys in a comma separated list.
|
java.util.List<java.lang.String> |
getKeys()
Returns a copy of the list of keys.
|
java.lang.String |
getPartition() |
java.lang.String |
getTable()
Name of the table to index, in uppercase.
|
void |
giveSuggestedName(java.lang.String ixname)
Suggest a name for this index.
|
boolean |
hasIndexName() |
boolean |
hasPartition() |
boolean |
includeTenantID() |
void |
insertMetaData(java.sql.Connection connection)
Insert the Maximo framework data for this index.
|
java.lang.Boolean |
isClustered() |
boolean |
isRequired() |
boolean |
isTextSearch() |
boolean |
isUnique() |
void |
setClustered(boolean clusteredIndex)
Set whether this is a clustered index.
|
void |
setIncludeTenantID(boolean includeTenantID) |
void |
setIndexName(java.lang.String ixname)
Set the index's name.
|
void |
setPartition(java.lang.String indexPartition)
Returns the storage partition for the index.
|
void |
setRequired(boolean required)
Set whether this index is required by Maximo.
|
void |
setTextSearch(boolean textSearchIndex)
Set whether this is a text-search index, an Oracle-only structure.
|
void |
setUnique(boolean uniqueIndex)
Set whether this is a unique index.
|
public IndexDefinition(java.sql.Connection connection, java.lang.String tbname)
connection
- Connection to the database.tbname
- Name of the table to index.public void addKey(java.lang.String column)
column
- Name of the columnpublic void giveSuggestedName(java.lang.String ixname)
ixname
- Suggested name.public void setUnique(boolean uniqueIndex)
uniqueIndex
- public void setTextSearch(boolean textSearchIndex)
textSearchIndex
- public void setClustered(boolean clusteredIndex)
clusteredIndex
- public void addKey(java.lang.String column, boolean ascending)
column
- ascending
- public java.util.List<java.lang.String> getKeys()
public void addFirstKey(java.lang.String column, boolean ascending)
column
- name of the columnascending
- is it ascending?public java.lang.String getTable()
public java.lang.Boolean isClustered()
public java.lang.Object getKeyDef()
public boolean isUnique()
public java.lang.String getIndexName()
public void setIndexName(java.lang.String ixname)
ixname
- new name for the index.public boolean hasIndexName()
public void setPartition(java.lang.String indexPartition)
indexPartition
- public static java.util.List<IndexDefinition> fetchIndexDefinition(java.sql.Connection connection, java.lang.String whereClause) throws java.sql.SQLException
connection
- Connection to the databasewhereClause
- Where clause on the MaxSysIndexes tablejava.sql.SQLException
public void setRequired(boolean required)
required
- public boolean isTextSearch()
public java.lang.String getPartition()
public boolean hasPartition()
public boolean isRequired()
public void insertMetaData(java.sql.Connection connection) throws java.sql.SQLException
connection
- Connection to the database.java.sql.SQLException
public boolean includeTenantID()
public void setIncludeTenantID(boolean includeTenantID)