|
|||||||||
| Home >> All >> javatools >> [ db overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
javatools.db
Class DbJoinedTable

java.lang.Objectjavatools.db.AbstractTable
javatools.db.DbAbstractTable
javatools.db.DbJoinedTable
- All Implemented Interfaces:
- DbTableUser
- public class DbJoinedTable
- extends DbAbstractTable
This class represents a "joined table" in an SQL statement.
- Version:
- 0.2.0
| Field Summary | |
static int |
INNER_JOIN
Represents an inner join. |
private DbExpr |
joinCondition
|
private int |
joinType
|
static int |
LEFT_JOIN
Represents a left join. |
static int |
NATURAL_JOIN
Represents a left join. |
static int |
OUTER_JOIN
Represents an outer join. |
static int |
RIGHT_JOIN
Represents a right join. |
private DbAbstractTable |
tableLeft
|
private DbAbstractTable |
tableRight
|
| Fields inherited from class javatools.db.DbAbstractTable |
db |
| Fields inherited from class javatools.db.AbstractTable |
colNameMap, displaySize, names, tableName, types |
| Constructor Summary | |
DbJoinedTable(DbDatabase db,
DbAbstractTable tabLeft,
DbAbstractTable tabRight,
int pJoinType,
DbExpr pJoinCondition)
Creates a new instance of DbJoinedTable |
|
| Method Summary | |
private void |
buildTableName()
|
DbDeleter |
deleter()
Returns a deleter for deleting rows in the database. |
boolean |
equals(java.lang.Object o)
Check if an object is equal to the current one. |
DbColumn |
getColumn(int index)
Get the column of the given index. |
DbColumn |
getColumn(java.lang.String name)
Get the DbColumn representing the column with this name. |
int |
getColumnCount()
Returns the number of columns |
DbConstraint |
getConstraint()
Returns the DbConstraint object associated with this table. |
java.lang.Object |
getDefault(int index)
Returns the default value for the field at the given index. |
java.lang.Object |
getDefault(java.lang.String name)
Returns the default value for the field whose name is specified. |
DbInserter |
inserter()
Return an inserter for inserting new data in the database. |
DbInserter |
inserter(DbSelector selector)
Return an inserter for inserting new data in the database. |
void |
setTableName(java.lang.String v)
Sets the name of the referenced table. |
DbDeleter |
simpleDeleter()
Returns a deleter for deleting rows in the database. |
DbInserter |
simpleInserter()
Return an inserter for inserting new data in the database. |
DbInserter |
simpleInserter(DbSelector selector)
Return an inserter for inserting new data in the database. |
DbUpdater |
simpleUpdater()
Return an updater for updating rows in the database. |
DbUpdater |
updater()
Return an updater for updating rows in the database. |
void |
usesTables(java.util.Set c)
Returns the base tables used in this joined table. |
| Methods inherited from class javatools.db.DbAbstractTable |
getDatabase |
| Methods inherited from class javatools.db.AbstractTable |
getColumnIndex, getColumnName, getFullTableName, setColumnCount, setColumnName |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
INNER_JOIN
public static final int INNER_JOIN
- Represents an inner join.
- See Also:
- Constant Field Values
NATURAL_JOIN
public static final int NATURAL_JOIN
- Represents a left join.
- See Also:
- Constant Field Values
LEFT_JOIN
public static final int LEFT_JOIN
- Represents a left join.
- See Also:
- Constant Field Values
RIGHT_JOIN
public static final int RIGHT_JOIN
- Represents a right join.
- See Also:
- Constant Field Values
OUTER_JOIN
public static final int OUTER_JOIN
- Represents an outer join.
- See Also:
- Constant Field Values
tableLeft
private DbAbstractTable tableLeft
tableRight
private DbAbstractTable tableRight
joinType
private int joinType
joinCondition
private DbExpr joinCondition
| Constructor Detail |
DbJoinedTable
public DbJoinedTable(DbDatabase db, DbAbstractTable tabLeft, DbAbstractTable tabRight, int pJoinType, DbExpr pJoinCondition) throws DbException
- Creates a new instance of DbJoinedTable
| Method Detail |
getDefault
public java.lang.Object getDefault(int index) throws DbException
- Returns the default value for the field at the given index.
- Specified by:
getDefaultin classDbAbstractTable
equals
public boolean equals(java.lang.Object o)
- Check if an object is equal to the current one.
- Overrides:
equalsin classAbstractTable
getDefault
public java.lang.Object getDefault(java.lang.String name) throws DbException
- Returns the default value for the field whose name is specified.
- Specified by:
getDefaultin classDbAbstractTable
getColumn
public DbColumn getColumn(java.lang.String name) throws DbException
- Get the DbColumn representing the column with this name.
- Specified by:
getColumnin classDbAbstractTable
getColumnCount
public int getColumnCount()
- Returns the number of columns
- Overrides:
getColumnCountin classAbstractTable
deleter
public DbDeleter deleter() throws DbException
- Returns a deleter for deleting rows in the database.
This deleter takes care of constraints.
- Overrides:
deleterin classDbAbstractTable
getConstraint
public DbConstraint getConstraint()
- Returns the DbConstraint object associated with this table.
- Specified by:
getConstraintin classDbAbstractTable
getColumn
public DbColumn getColumn(int index) throws DbException
- Get the column of the given index. Index is a zero based array.
- Specified by:
getColumnin classDbAbstractTable
inserter
public DbInserter inserter() throws DbException
- Return an inserter for inserting new data in the database. This method is
for SQL of the form INSERT INTO table(...) VALUES(...)
This inserter takes care of constraints.
- Overrides:
inserterin classDbAbstractTable
inserter
public DbInserter inserter(DbSelector selector) throws DbException
- Return an inserter for inserting new data in the database. This method is
for SQL of the form INSERT INTO table(...) SELECT ...
This inserter takes care of constraints.
- Overrides:
inserterin classDbAbstractTable
setTableName
public void setTableName(java.lang.String v)
- Sets the name of the referenced table.
- Overrides:
setTableNamein classAbstractTable
simpleDeleter
public DbDeleter simpleDeleter() throws DbException
- Returns a deleter for deleting rows in the database.
This deleter takes care of constraints.
- Overrides:
simpleDeleterin classDbAbstractTable
simpleInserter
public DbInserter simpleInserter() throws DbException
- Return an inserter for inserting new data in the database. This method is
for SQL of the form INSERT INTO table(...) SELECT ...
This inserter DOES NOT take care of constraints.
- Overrides:
simpleInserterin classDbAbstractTable
simpleInserter
public DbInserter simpleInserter(DbSelector selector) throws DbException
- Return an inserter for inserting new data in the database. This method is
for SQL of the form INSERT INTO table(...) SELECT ...
This inserter DOES NOT take care of constraints.
- Overrides:
simpleInserterin classDbAbstractTable
simpleUpdater
public DbUpdater simpleUpdater() throws DbException
- Return an updater for updating rows in the database.
This updater DOES NOT take care of constraints.
- Overrides:
simpleUpdaterin classDbAbstractTable
updater
public DbUpdater updater() throws DbException
- Return an updater for updating rows in the database.
This updater takes care of constraints.
- Overrides:
updaterin classDbAbstractTable
usesTables
public void usesTables(java.util.Set c)
- Returns the base tables used in this joined table.
- Specified by:
usesTablesin interfaceDbTableUser- Overrides:
usesTablesin classAbstractTable
buildTableName
private void buildTableName()
throws DbException
|
|||||||||
| Home >> All >> javatools >> [ db overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC