|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--javatools.db.DbAbstractTable
|
+--javatools.db.DbJoinedTable
This class represents a "joined table" in an SQL statement.
| Field Summary | |
static int |
INNER_JOIN
Represents an inner join. |
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. |
| Fields inherited from class javatools.db.DbAbstractTable |
db, 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 | |
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, getFullTableName |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int INNER_JOIN
public static final int NATURAL_JOIN
public static final int LEFT_JOIN
public static final int RIGHT_JOIN
public static final int OUTER_JOIN
| Constructor Detail |
public DbJoinedTable(DbDatabase db,
DbAbstractTable tabLeft,
DbAbstractTable tabRight,
int pJoinType,
DbExpr pJoinCondition)
throws DbException
db - The database to use.tabLeft - The left table to be joined.tabRight - The right table to be joined.pJoinType - The join type to use.pJoinCondition - The join condition expression.
DbException - If something goes wrong.| Method Detail |
public java.lang.Object getDefault(int index)
throws DbException
getDefault in class DbAbstractTableindex - The field index.
DbException - If something goes wrong.public boolean equals(java.lang.Object o)
equals in class DbAbstractTableo - The object to be compared.
true: if these object are equal;
false: otherwise.
public java.lang.Object getDefault(java.lang.String name)
throws DbException
getDefault in class DbAbstractTablename - The name of the needed field.
DbException - If something goes wrong.
public DbColumn getColumn(java.lang.String name)
throws DbException
getColumn in class DbAbstractTablename - The name of tjhe needed column
DbException - If something goes wrong.public int getColumnCount()
getColumnCount in class DbAbstractTable
public DbDeleter deleter()
throws DbException
deleter in class DbAbstractTableDbException - If something goes wrong.public DbConstraint getConstraint()
getConstraint in class DbAbstractTable
public DbColumn getColumn(int index)
throws DbException
getColumn in class DbAbstractTableindex - The position of the needed column.
DbException - If something goes wrong.
public DbInserter inserter()
throws DbException
inserter in class DbAbstractTableDbException - If something goes wrong.
public DbInserter inserter(DbSelector selector)
throws DbException
inserter in class DbAbstractTableselector - The selector to create the DbInserter object.
DbException - If something goes wrong.public void setTableName(java.lang.String v)
setTableName in class DbAbstractTablev - The table name.
public DbDeleter simpleDeleter()
throws DbException
simpleDeleter in class DbAbstractTableDbException - If something goes wrong.
public DbInserter simpleInserter()
throws DbException
simpleInserter in class DbAbstractTableDbException - If something goes wrong.
public DbInserter simpleInserter(DbSelector selector)
throws DbException
simpleInserter in class DbAbstractTableselector - The selector to create the DbInserter object.
DbException - If something goes wrong.
public DbUpdater simpleUpdater()
throws DbException
simpleUpdater in class DbAbstractTableDbException - If something goes wrong.
public DbUpdater updater()
throws DbException
updater in class DbAbstractTableDbException - If something goes wrong.public void usesTables(java.util.Set c)
usesTables in interface DbTableUserusesTables in class DbAbstractTablec - The set in which used tables will be put.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||