Package org.apache.empire.db
Class DBExpressionIndex
java.lang.Object
org.apache.empire.db.DBObject
org.apache.empire.db.DBIndex
org.apache.empire.db.DBExpressionIndex
This class allows to create an expression based index
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.empire.db.DBIndex
DBIndex.DBIndexType -
Constructor Summary
ConstructorsConstructorDescriptionDBExpressionIndex(String name, boolean unique, DBColumnExpr... columnExpressions) Constructs a DBExpresionIndexDBExpressionIndex(String name, DBIndex.DBIndexType type, DBColumnExpr... columnExpressions) Constructs a DBExpresionIndex -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if this index contains the column colintgetColumnPos(DBColumn col) Gets the position of a specified DBColumn object.final DBDatabaseReturns the database object to which this object belongs to.Returns the columnExpressions belonging to this index.Methods inherited from class org.apache.empire.db.DBIndex
compareColumns, getColumn, getColumnCount, getColumns, getFullName, getName, getOptions, getTable, getType, setOptionsMethods inherited from class org.apache.empire.db.DBObject
checkParamNull
-
Constructor Details
-
DBExpressionIndex
Constructs a DBExpresionIndex- Parameters:
name- the index nametype- the index typecolumnExpressions- an array of one or more column expressions of the index
-
DBExpressionIndex
Constructs a DBExpresionIndex- Parameters:
name- the index nameunique- flag whether the index is uniquecolumnExpressions- the index columns Overload for convenience
-
-
Method Details
-
getDatabase
Description copied from class:DBObjectReturns the database object to which this object belongs to. For the database object itself this function will return the this pointer.- Overrides:
getDatabasein classDBIndex- Returns:
- the database object
-
getExpressions
Returns the columnExpressions belonging to this index.- Overrides:
getExpressionsin classDBIndex- Returns:
- the columnExpressions belonging to this index
-
contains
Checks if this index contains the column col -
getColumnPos
Gets the position of a specified DBColumn object.- Overrides:
getColumnPosin classDBIndex- Parameters:
col- the column- Returns:
- the position or -1 if the column was not found
-