|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.empire.db.DBObject
org.apache.empire.db.DBIndex
public class DBIndex
This class handles the primary key for the tables. The primary key contains one or more columns.
Field Summary | |
---|---|
static int |
PRIMARYKEY
SQL Primary key index |
static int |
STANDARD
SQL Standard index |
static int |
UNIQUE
SQL Unique index |
Constructor Summary | |
---|---|
DBIndex(String name,
int type,
DBColumn[] columns)
Constructs a DBIndex object set the specified parameters to this object. |
Method Summary | |
---|---|
boolean |
contains(DBColumn col)
Checks if this index contains the column col |
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. |
int |
getType()
Returns the index type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int STANDARD
public static final int UNIQUE
public static final int PRIMARYKEY
Constructor Detail |
---|
public DBIndex(String name, int 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 keyMethod Detail |
---|
public DBTable getTable()
public DBDatabase getDatabase()
DBObject
getDatabase
in class DBObject
public String getName()
public DBColumn[] getColumns()
public DBExpr[] getExpressions()
public String getFullName()
public int getType()
PRIMARYKEY
, UNIQUE
, STANDARD
)public boolean contains(DBColumn col)
col
- the column
public int getColumnPos(DBColumn col)
col
- the column
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |