|
SolarMetric Kodo JDO 3.0.3 generated on February 20 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Abstraction of a SQL SELECT statement.
| Field Summary | |
static int |
BATCH_INNER
Constant indicating to batch the select using an inner join. |
static int |
BATCH_OUTER
Constant indicating to batch the select using an outer join. |
static int |
BATCH_SELECT
Constant indicating to batch the select using a separate select. |
static int |
SUBS_ANY
Constant indicating to select subclasses but without adding any class conditions to the select. |
static int |
SUBS_EXACT
Constant indicating to select this class but without adding any class conditions to the select. |
static int |
SUBS_FALSE
Constant indicating to add conditions to the select to select this class only. |
static int |
SUBS_TRUE
Constant indicating to add conditions to the selcet to select this class and subclasses only. |
| Method Summary | |
void |
addBatchedType(ClassMapping type)
Record that this select is for vrow columns of the given type. |
void |
addJoins(SQLBuffer buf,
Joins joins)
Add SQL for the given joins to the given buffer. |
Joins |
and(Joins joins1,
Joins joins2)
AND the given joins together. |
Select |
batchSelect(Object key,
ClassMapping mapping,
int batchType)
Return SELECT that will be batched with this one, or null if the select cannot be batched for the given mapping and join type. |
void |
clearSelects()
Clears any selected columns or aggregates. |
Collection |
getBatchedKeys()
Return the set of batched select keys. |
Select |
getBatchedSelect(Object key)
Return the batched select for the given key, or null if none. |
Joins |
getJoins()
Return the joins on this select. |
int |
getJoinSyntax()
The join syntax for this select, as one of the syntax constants from Join. |
List |
getOrderings()
Return a collection of orderings on this statement. |
int |
getResultSetConcurrency()
The result set concurrency, such as ResultSet.CONCUR_READ_ONLY,
or -1 for the default. |
int |
getResultSetType()
The result set type, such as ResultSet.TYPE_FORWARD_ONLY,
or -1 for the default. |
List |
getSelectAliases()
Return the aliases of all selected columns and all selected buffers, in the order they were selected. |
Collection |
getSelectedTableAliases()
Return the set of selected table aliases. |
Collection |
getSelectedTables()
Return the set of selected tables. |
List |
getSelects()
Return all selected columns and buffer ids, in the order they were selected. |
SQLBuffer |
getWhere()
Return the WHERE clause, minus any necessary end joins. |
boolean |
isDistinct()
Return true if this is a SELECT DISTINCT. |
boolean |
isForUpdate()
Return true if this is a FOR UPDATE select. |
boolean |
isSelectCount()
Return true if this is a SELECT COUNT. |
Select |
joinsSelect()
Return a SELECT with the same aliases as this one. |
Joins |
newJoins()
Return a new instance to use for joining. |
Joins |
or(Joins joins1,
Joins joins2)
OR the given joins together. |
void |
orderBy(Column[] cols,
boolean ascending)
Add an ORDER BY clause. |
void |
orderBy(Column[] cols,
boolean ascending,
Joins joins)
Add an ORDER BY clause. |
void |
orderBy(Column col,
boolean ascending)
Add an ORDER BY clause. |
void |
orderBy(Column col,
boolean ascending,
Joins joins)
Add an ORDER BY clause. |
Joins |
orderBy(Joins joins1,
Joins joins2)
Combine the given joins. |
void |
orderBy(SQLBuffer sql,
boolean ascending)
Add an ORDER BY clause. |
void |
orderBy(SQLBuffer sql,
boolean ascending,
Joins joins)
Add an ORDER BY clause. |
String |
reserveTableAlias(Table table)
Reserve the next alias for the given table. |
void |
select(ClassMapping mapping,
int subclasses,
JDBCFetchConfiguration fetch,
int batch)
Select the columns of the given mapping, possibly including subclasses. |
void |
select(ClassMapping mapping,
int subclasses,
JDBCFetchConfiguration fetch,
int batch,
Joins joins)
Select the columns of the given mapping aftering joining to it, possibly including subclasses. |
void |
select(Column col)
Select the given column. |
void |
select(Column[] cols)
Select the given columns. |
void |
select(Column[] cols,
Joins joins)
Select the given columns after making the given joins. |
void |
select(Column col,
Joins joins)
Select the given column after making the given joins. |
void |
select(SQLBuffer buf,
Object id)
Select the given buffer; the given id object is an identifier to use when retrieving the corresponding value from a Result. |
void |
select(SQLBuffer buf,
Object id,
Joins joins)
Select the given buffer; the given id object is an identifier to use when retrieving the corresponding value from a Result. |
void |
selectPrimaryKey(ClassMapping mapping)
Select the primary key columns of the given mapping, joining to superclasses as necessary to get all columns needed to construct an object id. |
void |
setForUpdate(boolean forUpdate)
Whether this is a FOR UPDATE select. |
void |
setJoinSyntax(int joinSyntax)
The join syntax for this select, as one of the syntax constants from Join. |
void |
setResultSetConcurrency(int concur)
The result set concurrency, such as ResultSet.CONCUR_READ_ONLY,
or -1 for the default. |
void |
setResultSetType(int type)
The result set type, such as ResultSet.TYPE_FORWARD_ONLY,
or -1 for the default. |
void |
setSelectCount(boolean count)
Select 'COUNT(*)'; the count overrides all other selects. |
Select |
subSelect(Joins parentJoins)
Return a subselect of this one. |
SQLBuffer |
toSelect()
Return this select as a SQL statement formatted for the given dictionary. |
void |
where(Joins joins)
Add the given where conditions. |
void |
where(SQLBuffer sql)
Add the given where conditions. |
void |
where(SQLBuffer sql,
Joins joins)
Add the given where conditions. |
void |
whereForeignKey(ForeignKey fk,
Object oid,
ClassMapping mapping)
Add where conditions setting the given foreign key to the given oid values. |
void |
whereForeignKey(ForeignKey fk,
Object oid,
ClassMapping mapping,
Joins joins)
Add where conditions setting the given foreign key to the given oid values. |
void |
wherePrimaryKey(Object oid,
ClassMapping mapping)
Add where conditions setting the mapping's primary key to the given oid values. |
void |
wherePrimaryKey(Object oid,
ClassMapping mapping,
Joins joins)
Add where conditions setting the mapping's primary key to the given oid values. |
| Field Detail |
public static final int BATCH_INNER
public static final int BATCH_OUTER
public static final int BATCH_SELECT
public static final int SUBS_TRUE
public static final int SUBS_FALSE
public static final int SUBS_ANY
public static final int SUBS_EXACT
| Method Detail |
public SQLBuffer toSelect()
public boolean isDistinct()
public boolean isForUpdate()
public void setForUpdate(boolean forUpdate)
public Collection getSelectedTables()
public Collection getSelectedTableAliases()
public List getSelects()
public List getSelectAliases()
public List getOrderings()
SQLBuffer for the ordering criteria, and
then a string for the order - "ASC" or "DESC".public SQLBuffer getWhere()
public Joins getJoins()
public int getResultSetType()
ResultSet.TYPE_FORWARD_ONLY,
or -1 for the default.public void setResultSetType(int type)
ResultSet.TYPE_FORWARD_ONLY,
or -1 for the default.public int getResultSetConcurrency()
ResultSet.CONCUR_READ_ONLY,
or -1 for the default.public void setResultSetConcurrency(int concur)
ResultSet.CONCUR_READ_ONLY,
or -1 for the default.public int getJoinSyntax()
Join.public void setJoinSyntax(int joinSyntax)
Join.public String reserveTableAlias(Table table)
public boolean isSelectCount()
public void setSelectCount(boolean count)
public void select(SQLBuffer buf,
Object id)
Result.
public void select(SQLBuffer buf,
Object id,
Joins joins)
Result.public void select(Column col)
public void select(Column col,
Joins joins)
public void select(Column[] cols)
public void select(Column[] cols,
Joins joins)
public void select(ClassMapping mapping,
int subclasses,
JDBCFetchConfiguration fetch,
int batch)
public void select(ClassMapping mapping,
int subclasses,
JDBCFetchConfiguration fetch,
int batch,
Joins joins)
public void clearSelects()
public void selectPrimaryKey(ClassMapping mapping)
public void where(Joins joins)
public void where(SQLBuffer sql)
public void where(SQLBuffer sql,
Joins joins)
public void wherePrimaryKey(Object oid,
ClassMapping mapping)
public void wherePrimaryKey(Object oid,
ClassMapping mapping,
Joins joins)
public void whereForeignKey(ForeignKey fk,
Object oid,
ClassMapping mapping)
wherePrimaryKey(java.lang.Object, kodo.jdbc.meta.ClassMapping)
public void whereForeignKey(ForeignKey fk,
Object oid,
ClassMapping mapping,
Joins joins)
wherePrimaryKey(java.lang.Object, kodo.jdbc.meta.ClassMapping)
public void orderBy(SQLBuffer sql,
boolean ascending)
public void orderBy(SQLBuffer sql,
boolean ascending,
Joins joins)
public void orderBy(Column col,
boolean ascending)
public void orderBy(Column col,
boolean ascending,
Joins joins)
public void orderBy(Column[] cols,
boolean ascending)
public void orderBy(Column[] cols,
boolean ascending,
Joins joins)
public Select joinsSelect()
public Select subSelect(Joins parentJoins)
public Select getBatchedSelect(Object key)
public Collection getBatchedKeys()
public Select batchSelect(Object key,
ClassMapping mapping,
int batchType)
key - the key for the batched selectmapping - the type the select is batchingbatchType - BATCH_INNER, BATCH_OUTER, or
BATCH_SELECTpublic void addBatchedType(ClassMapping type)
public Joins newJoins()
public void addJoins(SQLBuffer buf,
Joins joins)
public Joins and(Joins joins1,
Joins joins2)
public Joins or(Joins joins1,
Joins joins2)
public Joins orderBy(Joins joins1,
Joins joins2)
joins1 - joins from the main expressionjoins2 - joins from the ordering value
|
SolarMetric Kodo JDO 3.0.3 generated on February 20 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||