|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.ws.jaxme.sqls.impl.TableImpl org.apache.ws.jaxme.sqls.impl.ViewImpl
public class ViewImpl
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.ws.jaxme.sqls.impl.TableImpl |
---|
TableImpl.NameImpl |
Nested classes/interfaces inherited from interface org.apache.ws.jaxme.sqls.Table |
---|
Table.Name |
Constructor Summary | |
---|---|
protected |
ViewImpl(SelectStatement pSelectStatement,
Table.Name pName)
|
Method Summary | |
---|---|
Column |
getColumn(Column.Name 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. |
Index |
getPrimaryKey()
Returns the tables primary key, if any, or null, if the table doesn't have a primary key. |
UpdateStatement |
getUpdateStatement()
Returns an UPDATE statement for updating a column in the table. |
SelectStatement |
getViewStatement()
|
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 pReferencedTable)
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 org.apache.ws.jaxme.sqls.impl.TableImpl |
---|
equals, getColumn, getName, getQName, getSchema, getSelectStatement, hashCode |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected ViewImpl(SelectStatement pSelectStatement, Table.Name pName)
Method Detail |
---|
public java.util.Iterator getColumns()
Table
Returns the table columns.
getColumns
in interface Table
getColumns
in class TableImpl
public Column newColumn(Column.Name pName, Column.Type pType)
Table
Creates a new column.
newColumn
in interface Table
newColumn
in class TableImpl
public Column newColumn(java.lang.String pName, Column.Type pType)
Table
Creates a new column.
newColumn
in interface Table
newColumn
in class TableImpl
public Column getColumn(Column.Name pName)
Table
Returns the column with the given name or null, if no such column exists.
getColumn
in interface Table
getColumn
in class TableImpl
public Index newKey()
Table
Creates a new, unique index on the table.
newKey
in interface Table
newKey
in class TableImpl
public Index newIndex()
Table
Creates a new, non-unique index on the table.
newIndex
in interface Table
newIndex
in class TableImpl
public Index newPrimaryKey()
Table
Creates a new primary key on the table.
newPrimaryKey
in interface Table
newPrimaryKey
in class TableImpl
public ForeignKey newForeignKey(Table pReferencedTable)
Table
Creates a new foreign key referencing the given table.
newForeignKey
in interface Table
newForeignKey
in class TableImpl
public InsertStatement getInsertStatement()
Table
Returns 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 Table
getInsertStatement
in class TableImpl
SQLFactory.newInsertStatement()
public UpdateStatement getUpdateStatement()
Table
Returns 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 Table
getUpdateStatement
in class TableImpl
SQLFactory.newUpdateStatement()
public DeleteStatement getDeleteStatement()
Table
Returns 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 Table
getDeleteStatement
in class TableImpl
SQLFactory.newDeleteStatement()
public Index getPrimaryKey()
Table
Returns the tables primary key, if any, or null, if the table doesn't have a primary key.
getPrimaryKey
in interface Table
getPrimaryKey
in class TableImpl
public java.util.Iterator getIndexes()
Table
Returns an Iterator
to the indexes defined on the table.
This iterator includes the primary key, if any.
getIndexes
in interface Table
getIndexes
in class TableImpl
public java.util.Iterator getForeignKeys()
Table
Returns an Iterator
to the foreign keys defined on the
table.
getForeignKeys
in interface Table
getForeignKeys
in class TableImpl
public SelectStatement getViewStatement()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |