|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.ws.jaxme.sqls.impl.TableImpl
| Nested Class Summary | |
static class |
TableImpl.NameImpl
|
| Nested classes inherited from class org.apache.ws.jaxme.sqls.Table |
Table.Name |
| Constructor Summary | |
protected |
TableImpl(Schema pSchema,
Table.Name pName)
|
| Method Summary | |
boolean |
equals(java.lang.Object o)
|
Column |
getColumn(Column.Name pName)
Returns the column with the given name or null, if no such column exists. |
Column |
getColumn(java.lang.String pName)
Returns the column with the given name or null, if no such column exists. |
java.util.Iterator |
getColumns()
Returns the table columns. |
DeleteStatement |
getDeleteStatement()
Returns an UPDATE statement for updating a column in the table. |
java.util.Iterator |
getForeignKeys()
Returns an Iterator to the foreign keys defined on the
table. |
java.util.Iterator |
getIndexes()
Returns an Iterator to the indexes defined on the table. |
InsertStatement |
getInsertStatement()
Returns an INSERT statement for filling all the values. |
Table.Name |
getName()
Returns the table name. |
Index |
getPrimaryKey()
Returns the tables primary key, if any, or null, if the table doesn't have a primary key. |
java.lang.String |
getQName()
Returns the tables qualified name, which is getSchema().getName() + "." + getName(). |
Schema |
getSchema()
Returns the table schema. |
SelectStatement |
getSelectStatement()
Returns a SELECT statement for selecting all the columns. |
UpdateStatement |
getUpdateStatement()
Returns an UPDATE statement for updating a column in the table. |
int |
hashCode()
|
Column |
newColumn(Column.Name pName,
Column.Type pType)
Creates a new column. |
Column |
newColumn(java.lang.String pName,
Column.Type pType)
Creates a new column. |
ForeignKey |
newForeignKey(Table pTable)
Creates a new foreign key referencing the given table. |
Index |
newIndex()
Creates a new, non-unique index on the table. |
Index |
newKey()
Creates a new, unique index on the table. |
Index |
newPrimaryKey()
Creates a new primary key on the table. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected TableImpl(Schema pSchema,
Table.Name pName)
| Method Detail |
public Schema getSchema()
TableReturns the table schema.
getSchema in interface Tablepublic Table.Name getName()
TableReturns the table name.
getName in interface Tablepublic java.lang.String getQName()
TableReturns the tables qualified name, which is
getSchema().getName() + "." + getName(). If the
schema is the default schema, returns getName().
getQName in interface Tablepublic java.util.Iterator getColumns()
TableReturns the table columns.
getColumns in interface Table
public Column newColumn(java.lang.String pName,
Column.Type pType)
TableCreates a new column.
newColumn in interface Table
public Column newColumn(Column.Name pName,
Column.Type pType)
TableCreates a new column.
newColumn in interface Tablepublic Column getColumn(Column.Name pName)
TableReturns the column with the given name or null, if no such column exists.
getColumn in interface Tablepublic Column getColumn(java.lang.String pName)
TableReturns the column with the given name or null, if no such column exists.
getColumn in interface Tablepublic Index newKey()
TableCreates a new, unique index on the table.
newKey in interface Tablepublic Index newIndex()
TableCreates a new, non-unique index on the table.
newIndex in interface Tablepublic Index getPrimaryKey()
TableReturns the tables primary key, if any, or null, if the table doesn't have a primary key.
getPrimaryKey in interface Tablepublic java.util.Iterator getIndexes()
TableReturns an Iterator to the indexes defined on the table.
This iterator includes the primary key, if any.
getIndexes in interface Tablepublic Index newPrimaryKey()
TableCreates a new primary key on the table.
newPrimaryKey in interface Tablepublic java.util.Iterator getForeignKeys()
TableReturns an Iterator to the foreign keys defined on the
table.
getForeignKeys in interface Tablepublic ForeignKey newForeignKey(Table pTable)
TableCreates a new foreign key referencing the given table.
newForeignKey in interface Tablepublic boolean equals(java.lang.Object o)
public int hashCode()
public InsertStatement getInsertStatement()
TableReturns an INSERT statement for filling all the values. In
other words: If the table FOO has the columns A, B, and C,
then the statement INSERT INTO FOO (A,B,C) VALUES (?, ?, ?)
will be returned.
getInsertStatement in interface TableSQLFactory.newInsertStatement()public SelectStatement getSelectStatement()
TableReturns a SELECT statement for selecting all the columns. In
other words: If the table FOO has the columns A, B, and C,
then the statement SELECT A, B, C FROM FOO will
be returned.
getSelectStatement in interface TableSQLFactory.newSelectStatement()public UpdateStatement getUpdateStatement()
TableReturns an UPDATE statement for updating a column in the table.
In other words: If the table FOO has the columns A, B, C and D
with the primary key columns A and B, then the statement
UPDATE FOO SET C = ?, D = ? WHERE A = ? AND B = ?
will be returned.
getUpdateStatement in interface TableSQLFactory.newUpdateStatement()public DeleteStatement getDeleteStatement()
TableReturns an UPDATE statement for updating a column in the table.
In other words: If the table FOO has the primary key columns A and B,
then the statement DELETE FROM FOO WHERE A = ? AND B = ?
will be returned.
getDeleteStatement in interface TableSQLFactory.newDeleteStatement()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||