|
SolarMetric Kodo JDO 2.5.8 generated on January 11 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.solarmetric.kodo.impl.jdbc.sql.SQLStatement
|
+--com.solarmetric.kodo.impl.jdbc.sql.Select
|
+--com.solarmetric.kodo.impl.jdbc.sql.ObjectSelect
Extends the basic SQL select with Object-level mapping methods for joining across relations, etc.
| Fields inherited from class com.solarmetric.kodo.impl.jdbc.sql.SQLStatement |
_dict, _resolver, _tables |
| Constructor Summary | |
ObjectSelect(DBDictionary dict,
ClassResolver resolver)
|
|
ObjectSelect(ObjectSelect copy,
ClassResolver resolver)
|
|
| Method Summary | |
SQLStatement |
and(SQLStatement same)
AND the previous WHERE clause with the given one. |
void |
clear()
Clear the WHERE clause and table list so that this statement can be reused. |
void |
clearWhere()
Clear the WHERE clause. |
ObjectSelect |
endRelationTraversal()
Reset the relation path. |
String |
getColumnAlias(Column col)
Return the alias being used for the given column, given the current series of traversed relations. |
SQLBuffer |
getSQLBuffer()
Return the SQLBuffer to be used for exeucting the statement; |
SQLBuffer |
getWhere()
Return the WHERE portion of the SQL statement. |
ObjectSelect |
join(Column[] col1,
Column[] col2)
Join the given columns. |
ObjectSelect |
joinRelation(ClassMapping cm,
Column[] col1,
Column[] col2)
Join the given columns, where the second column represents the traversal into a new relation. |
ObjectSelect |
joinRelation(Relation rel,
Column[] col1,
Column[] col2)
Join the given columns, where the second column represents the traversal into a new relation. |
SQLStatement |
or(SQLStatement same)
OR the previous WHERE clause with the given one. |
Select |
orderBy(Column col,
boolean asc)
Add the given column to the list of those in the ORDER BY clause of this statement. |
Select |
select(Column col)
Add the given column to the list of those selected by this statement. |
void |
setRelationVariable(String var)
Set the relation variable to use in calls to getColumnAlias(com.solarmetric.kodo.impl.jdbc.schema.Column). |
ObjectSelect |
traverseRelation(String name)
Traverse into the given relation; this should be followed by the joinRelation(com.solarmetric.kodo.impl.jdbc.ormapping.Relation, com.solarmetric.kodo.impl.jdbc.schema.Column[], com.solarmetric.kodo.impl.jdbc.schema.Column[]) method call. |
SQLStatement |
where(Column[] cols,
Object[] values)
Set the criteria to inclde that the the given columns must equal the given values; this also adds the tables of the given columns to the tables clause of this statement. |
SQLStatement |
where(Column col,
boolean value)
See where(Column,Object). |
SQLStatement |
where(Column col,
byte value)
|
SQLStatement |
where(Column col,
char value)
See where(Column,Object). |
SQLStatement |
where(Column col,
double value)
See where(Column,Object). |
SQLStatement |
where(Column col,
float value)
See where(Column,Object). |
SQLStatement |
where(Column col,
int value)
See where(Column,Object). |
SQLStatement |
where(Column col,
long value)
See where(Column,Object). |
SQLStatement |
where(Column col,
Object value)
Set the criteria to inclde that the the given column must equal the given value; this also adds the table of the given column to the tables clause of this statement. |
SQLStatement |
where(Column col,
short value)
See where(Column,Object). |
SQLStatement |
where(SQLBuffer clause)
Set the given clause to the WHERE part of this statement. |
| Methods inherited from class com.solarmetric.kodo.impl.jdbc.sql.Select |
clearOrderBy, clearSelect, getOrderBy, getSelects, isDistinct, isUpdate, isValid, orderBy, orderByInternal, retainTableInWhere, select, selectCount, selectCount, selectCount, selectCountInternal, selectInternal, setDistinct, setUpdate |
| Methods inherited from class com.solarmetric.kodo.impl.jdbc.sql.SQLStatement |
clearTable, columnName, getClassResolver, getDictionary, getTables, getWhereSize, not, popWhere, pushWhere, toString, whereInternal, whereInternal |
| Methods inherited from class java.lang.Object |
|
| Constructor Detail |
public ObjectSelect(DBDictionary dict,
ClassResolver resolver)
public ObjectSelect(ObjectSelect copy,
ClassResolver resolver)
| Method Detail |
public Select select(Column col)
Selectselect in class Select
public Select orderBy(Column col,
boolean asc)
SelectorderBy in class Selectpublic SQLStatement where(SQLBuffer clause)
SQLStatementwhere in class SQLStatement
public SQLStatement where(Column col,
Object value)
SQLStatementwhere in class SQLStatement
public SQLStatement where(Column col,
boolean value)
SQLStatementSQLStatement.where(Column,Object).where in class SQLStatement
public SQLStatement where(Column col,
byte value)
public SQLStatement where(Column col,
char value)
SQLStatementSQLStatement.where(Column,Object).where in class SQLStatement
public SQLStatement where(Column col,
double value)
SQLStatementSQLStatement.where(Column,Object).where in class SQLStatement
public SQLStatement where(Column col,
float value)
SQLStatementSQLStatement.where(Column,Object).where in class SQLStatement
public SQLStatement where(Column col,
int value)
SQLStatementSQLStatement.where(Column,Object).where in class SQLStatement
public SQLStatement where(Column col,
long value)
SQLStatementSQLStatement.where(Column,Object).where in class SQLStatement
public SQLStatement where(Column col,
short value)
SQLStatementSQLStatement.where(Column,Object).where in class SQLStatement
public SQLStatement where(Column[] cols,
Object[] values)
SQLStatementwhere in class SQLStatementpublic SQLBuffer getWhere()
SQLStatementgetWhere in class SQLStatementpublic void clear()
SQLStatementclear in class Selectpublic void clearWhere()
SQLStatementclearWhere in class SQLStatementpublic SQLStatement and(SQLStatement same)
SQLStatementsql.where (foo).and (sql.where (bar));.and in class SQLStatementpublic SQLStatement or(SQLStatement same)
SQLStatementsql.where (foo).or (sql.where (bar));.or in class SQLStatementpublic ObjectSelect traverseRelation(String name)
joinRelation(com.solarmetric.kodo.impl.jdbc.ormapping.Relation, com.solarmetric.kodo.impl.jdbc.schema.Column[], com.solarmetric.kodo.impl.jdbc.schema.Column[]) method call.public ObjectSelect endRelationTraversal()
public void setRelationVariable(String var)
getColumnAlias(com.solarmetric.kodo.impl.jdbc.schema.Column). Should be invoked with the name
of the current variable when traversing relations or otherwise
invoking FieldMapping code that might cause
joinRelation(com.solarmetric.kodo.impl.jdbc.ormapping.Relation, com.solarmetric.kodo.impl.jdbc.schema.Column[], com.solarmetric.kodo.impl.jdbc.schema.Column[]) to be invoked. This value is
cleared when endRelationTraversal() is invoked.
public ObjectSelect join(Column[] col1,
Column[] col2)
public ObjectSelect joinRelation(Relation rel,
Column[] col1,
Column[] col2)
rel.getRelationType()..
public ObjectSelect joinRelation(ClassMapping cm,
Column[] col1,
Column[] col2)
cm rather than looking it up based on the
relation information.public String getColumnAlias(Column col)
public SQLBuffer getSQLBuffer()
SQLStatementgetSQLBuffer in class Select
|
SolarMetric Kodo JDO 2.5.8 generated on January 11 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||