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
public class Index extends GrainElement implements 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 Constructor Description Index(BasicTable t, String name, String[] columns)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete()
Deletes the index.int
getColumnIndex(String name)
Column index in the list of columns.Map<String,Column<?>>
getColumns()
Returns columns of the index.BasicTable
getTable()
Returns table of the index.-
Methods inherited from class ru.curs.celesta.score.GrainElement
getGrain, getGrainPart
-
Methods inherited from class ru.curs.celesta.score.NamedElement
equals, getCelestaDoc, getName, getQuotedName, getQuotedNameIfNeeded, hashCode, limitName, limitName, setCelestaDoc
-
-
-
-
Constructor Detail
-
Index
public Index(BasicTable t, String name, String[] columns) throws ParseException
- Throws:
ParseException
-
-
Method Detail
-
getTable
public BasicTable getTable()
Returns table of the index.- Returns:
-
getColumns
public Map<String,Column<?>> getColumns()
Returns columns of the index.- Specified by:
getColumns
in interfaceHasColumns
- Returns:
-
delete
public void delete() throws ParseException
Deletes the index.- Throws:
ParseException
- when trying to change the system grain
-
getColumnIndex
public int getColumnIndex(String name)
Description copied from interface:HasColumns
Column index in the list of columns.- Specified by:
getColumnIndex
in interfaceHasColumns
- Parameters:
name
- column name.
-
-