public class DBIndex extends DBObject
Modifier and Type | Class and Description |
---|---|
static class |
DBIndex.DBIndexType |
Constructor and Description |
---|
DBIndex(String name,
DBIndex.DBIndexType type,
DBColumn[] columns)
Constructs a DBIndex object set the specified parameters to this object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
compareColumns(DBColumn[] columns)
checks whether the columns of this index match the supplied columns
|
boolean |
contains(DBColumn col)
Checks if this index contains the column col
|
DBColumn |
getColumn(int index)
Returns the columns belonging to this index.
|
int |
getColumnCount()
Returns the number of columns belonging to this index.
|
int |
getColumnPos(DBColumn col)
Gets the position of a specified DBColumn object.
|
DBColumn[] |
getColumns()
Returns the columns belonging to this index.
|
DBDatabase |
getDatabase()
Returns the database object to which this object belongs to.
|
DBExpr[] |
getExpressions()
Returns the columnExpressions belonging to this index.
|
String |
getFullName()
Returns the full qualified table name.
|
String |
getName()
Returns the primary key name.
|
DBTable |
getTable()
returns the table this index belongs to.
|
DBIndex.DBIndexType |
getType()
Returns the index type.
|
checkParamNull
public DBIndex(String name, DBIndex.DBIndexType type, DBColumn[] columns)
name
- the primary key nametype
- the primary key type (only PRIMARYKEY)columns
- an array of one or more columns of the primary keypublic DBTable getTable()
public DBDatabase getDatabase()
DBObject
getDatabase
in class DBObject
public String getName()
public DBColumn[] getColumns()
public DBColumn getColumn(int index)
public int getColumnCount()
public boolean compareColumns(DBColumn[] columns)
columns
- public DBExpr[] getExpressions()
public String getFullName()
public DBIndex.DBIndexType getType()
public boolean contains(DBColumn col)
col
- the columnpublic int getColumnPos(DBColumn col)
col
- the columnCopyright © 2008–2023 Apache Software Foundation. All rights reserved.