|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.mortbay.JDBC.ColumnGroup | +--com.mortbay.JDBC.Table
JDBC Table wrapper
The Table class holds Meta data about a JDBC table. It is used in preference to JDBC metadata as:
Database
Field Summary | |
ColumnGroup |
otherCols
|
ColumnGroup |
otherKeys
|
Key |
primaryKey
|
Fields inherited from class com.mortbay.JDBC.ColumnGroup |
columns |
Constructor Summary | |
Table(java.lang.String name,
Column[] columns,
Database database)
Table constructor |
Method Summary | |
java.lang.String |
create()
|
Database |
database()
|
void |
database(Database db)
Set the database used by this table. |
void |
deleteRow(java.lang.Object primaryValues)
Delete a row from the table singular primary key |
void |
deleteRows(ColumnGroup columns,
java.lang.Object[] values)
Delete a row from the table by column group values |
void |
deleteRows(java.lang.Object[] primaryValues)
Delete a row from the table by primary key values |
void |
deleteRows(java.lang.String whereClause)
Delete a row from the table by arbitrary WHERE clause |
java.lang.String |
drop()
|
DbAdaptor |
getAdaptor()
|
Database |
getDatabase()
|
Row |
getRow(java.lang.Object primaryValue)
Get a row from the table if it has a single primary key Create it if it does not exist. |
Row |
getRow(java.lang.Object[] primaryValues)
Get a row from the table. |
RowEnumeration |
getRows(ColumnGroup columns,
java.lang.Object[] values)
Get a rows from the table by non primary key |
RowEnumeration |
getRows(java.lang.String whereClause)
Get a rows from the table by arbitrary where clause |
boolean |
hasPrimary()
Does this table have a primary key |
Row |
newRow()
Create a new row in the table |
java.lang.String |
toString()
Create table description |
Methods inherited from class com.mortbay.JDBC.ColumnGroup |
column,
getName,
index,
main,
toString,
toString,
toValuesString |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public Key primaryKey
public ColumnGroup otherKeys
public ColumnGroup otherCols
Constructor Detail |
public Table(java.lang.String name, Column[] columns, Database database)
name
- The name of the tablecolumns
- Array of column descriptorsdatabase
- The database to use.Method Detail |
public Database getDatabase()
public DbAdaptor getAdaptor()
public boolean hasPrimary()
public Row newRow()
public Row getRow(java.lang.Object primaryValue) throws java.sql.SQLException
public Row getRow(java.lang.Object[] primaryValues) throws java.sql.SQLException
public RowEnumeration getRows(ColumnGroup columns, java.lang.Object[] values) throws java.sql.SQLException
public RowEnumeration getRows(java.lang.String whereClause) throws java.sql.SQLException
public void deleteRow(java.lang.Object primaryValues) throws java.sql.SQLException
public void deleteRows(java.lang.Object[] primaryValues) throws java.sql.SQLException
public void deleteRows(ColumnGroup columns, java.lang.Object[] values) throws java.sql.SQLException
public void deleteRows(java.lang.String whereClause) throws java.sql.SQLException
public Database database()
public void database(Database db)
public java.lang.String create()
public java.lang.String drop()
public java.lang.String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |