|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.wm.app.tn.util.TNFixedData
com.wm.app.tn.db.TableExpression
public class TableExpression
This represents the table expression in a SELECT statement. It's represented in this way so that ISQLHelper implementations can generate join statements in a database-specific way. This isn't too big a deal for single-table selects and simple joins, but the SQL for (e.g.) a left outer join can be ugly and DB-dependent.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.wm.app.tn.util.TNFixedData |
---|
com.wm.app.tn.util.TNFixedData.TreeCursor |
Field Summary | |
---|---|
static java.lang.String |
J_FULL_OUTER
|
static java.lang.String |
J_INNER
|
static java.lang.String |
J_LEFT_OUTER
|
static java.lang.String |
J_RIGHT_OUTER
|
Constructor Summary | |
---|---|
TableExpression()
Create a new TableExpression. |
Method Summary | |
---|---|
void |
addJoin(java.lang.String[] join)
Add a table join. |
void |
addJoin(java.lang.String type,
java.lang.String table,
java.lang.String alias,
java.lang.String on)
Add a table join. |
java.lang.String[] |
getBaseTable()
Get stored information about the base table. |
java.util.Enumeration |
getJoins()
Get the list of joined-in tables. |
void |
setBaseTable(java.lang.String table,
java.lang.String alias)
Set the base table for this select. |
Methods inherited from class com.wm.app.tn.util.TNFixedData |
---|
clone, dataSize, get, get, getCursor, getHashCursor, getIndexCursor, getKey, getSharedCursor, getTreeCursor, indexOf, merge, set, set, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String J_INNER
public static final java.lang.String J_LEFT_OUTER
public static final java.lang.String J_RIGHT_OUTER
public static final java.lang.String J_FULL_OUTER
Constructor Detail |
---|
public TableExpression()
Method Detail |
---|
public void setBaseTable(java.lang.String table, java.lang.String alias)
SELECT d.DocID FROM BizDoc d
table
- the name of the table (e.g. "BizDoc")alias
- the alias to use (e.g. "d")public java.lang.String[] getBaseTable()
public void addJoin(java.lang.String type, java.lang.String table, java.lang.String alias, java.lang.String on)
type
- the type of join (e.g. J_INNER)table
- the name of the table to join in (e.g. "BizDocAttribute")alias
- the alias of the table in the stmt (e.g. "bda0")on
- a SQL expression describing the criteria on which to joinpublic void addJoin(java.lang.String[] join)
join
- the join as { type, table, alias, on }public java.util.Enumeration getJoins()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |