Package com.mckoi.database
Class DataIndexSetDef
java.lang.Object
com.mckoi.database.DataIndexSetDef
Represents the meta-data for a set of indexes of a table.
- Author:
- Tobias Downer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a DataIndexDef to this table.intfindIndexForColumns(String[] cols) Finds the first index for the given column name list.intfindIndexWithName(String index_name) Finds the index with the given name and returns the index in the list of the index (confusing comment!).indexAt(int i) Returns the DataIndexDef at the given index in this list.intReturns the total number of index in this table.indexWithName(String index_name) Returns the DataIndexDef with the given name or null if it couldn't be found.static DataIndexSetDefReads the DataIndexSetDef object from the given DataInput.voidremoveDataIndexDef(int i) Removes a DataIndexDef to this table.resolveIndexName(String index_name, boolean ignore_case) Attempts to resolve the given index name from the index in this table.voidSets the immutable flag.voidwrite(DataOutput dout) Writes this DataIndexSetDef object to the given DataOutput.
-
Constructor Details
-
DataIndexSetDef
Constructor. -
DataIndexSetDef
-
-
Method Details
-
setImmutable
public void setImmutable()Sets the immutable flag. -
addDataIndexDef
Adds a DataIndexDef to this table. -
removeDataIndexDef
public void removeDataIndexDef(int i) Removes a DataIndexDef to this table. -
indexCount
public int indexCount()Returns the total number of index in this table. -
indexAt
Returns the DataIndexDef at the given index in this list. -
findIndexWithName
Finds the index with the given name and returns the index in the list of the index (confusing comment!). Returns -1 if the name wasn't found. -
findIndexForColumns
Finds the first index for the given column name list. Returns -1 if an index over the given composite columns was not found. -
indexWithName
Returns the DataIndexDef with the given name or null if it couldn't be found. -
resolveIndexName
Attempts to resolve the given index name from the index in this table. If 'ignore_case' is true, then we return the correct case of the index name.- Throws:
DatabaseException
-
write
Writes this DataIndexSetDef object to the given DataOutput.- Throws:
IOException
-
read
Reads the DataIndexSetDef object from the given DataInput.- Throws:
IOException
-