Package ru.curs.celesta.score
Class Index
java.lang.Object
ru.curs.celesta.score.NamedElement
ru.curs.celesta.score.GrainElement
ru.curs.celesta.score.Index
- All Implemented Interfaces:
HasColumns
Table index. Celesta permits only creation of simple indices without
UNIQUE restriction.
-
Field Summary
Fields inherited from class ru.curs.celesta.score.NamedElement
MAX_IDENTIFIER_LENGTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete()Deletes the index.intgetColumnIndex(String name) Column index in the list of columns.Returns columns of the index.getTable()Returns table of the index.booleanisUnique()If the index is unique.voidsetUnique(boolean unique) Sets the "unique" property for the index.Methods inherited from class ru.curs.celesta.score.GrainElement
getGrain, getGrainPartMethods inherited from class ru.curs.celesta.score.NamedElement
equals, getCelestaDoc, getName, getQuotedName, getQuotedNameIfNeeded, hashCode, limitName, limitName, setCelestaDoc
-
Constructor Details
-
Index
- Throws:
ParseException
-
-
Method Details
-
getTable
Returns table of the index. -
getColumns
Returns columns of the index.- Specified by:
getColumnsin interfaceHasColumns
-
delete
Deletes the index.- Throws:
ParseException- when trying to change the system grain
-
getColumnIndex
Description copied from interface:HasColumnsColumn index in the list of columns.- Specified by:
getColumnIndexin interfaceHasColumns- Parameters:
name- column name.
-
isUnique
public boolean isUnique()If the index is unique. -
setUnique
Sets the "unique" property for the index.- Parameters:
unique- uniqueness value- Throws:
ParseException
-