<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
Oracle Application Server TopLink API Reference 10g (9.0.4.3) B10491-02 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectoracle.toplink.expressions.Expression
oracle.toplink.internal.expressions.DataExpression
oracle.toplink.internal.expressions.ObjectExpression
oracle.toplink.expressions.ExpressionBuilder
Purpose: Allow for instances of expression to be created. Expressions are Java object-level representations of SQL "where" clauses. The expressions attempt to mirror Java code as closely as possible.
Example:
<blockquote>
ExpressionBuilder employee = new ExpressionBuilder();
employee.get("firstName").equal("Bob").and(employee.get("lastName").equal("Smith"))
>> equivalent Java code: (employee.getFirstName().equals("Bob")) && (employee.getLastName().equals("Smith"))
>> equivalent SQL: (F_NAME = 'Bob') AND (L_NAME = 'Smith')
</blockquote>
Expression, Serialized Form| Field Summary |
| Fields inherited from class oracle.toplink.internal.expressions.ObjectExpression |
derivedExpressions, descriptor |
| Constructor Summary | |
ExpressionBuilder()PUBLIC: Create a new ExpressionBuilder. | |
ExpressionBuilder(java.lang.Class queryClass)ADVANCED: Create a new ExpressionBuilder representing instances of the argument class. | |
| Method Summary | |
oracle.toplink.internal.helper.DatabaseTable |
aliasForTable(oracle.toplink.internal.helper.DatabaseTable table)INTERNAL: Find the alias for a given table. |
int |
assignTableAliasesStartingAt(int initialValue)INTERNAL: Assign aliases to any tables which I own. |
java.lang.String |
descriptionOfNodeType()INTERNAL: Used for debug printing. |
boolean |
doesNotRepresentAnObjectInTheQuery()INTERNAL: There are cases (which we might want to eliminate?) |
oracle.toplink.internal.helper.DatabaseTable |
getAliasedViewTable()INTERNAL: |
ExpressionBuilder |
getBuilder()INTERNAL: Return the expression builder which is the ultimate base of this expression, or null if there isn't one (shouldn't happen if we start from a root) |
Descriptor |
getDescriptor()INTERNAL: Only usable after the session and class have been set. |
java.lang.Class |
getQueryClass()INTERNAL: |
oracle.toplink.publicinterface.Session |
getSession()INTERNAL: |
oracle.toplink.internal.expressions.SQLSelectStatement |
getStatement()INTERNAL: Return the statement that expression is for. |
oracle.toplink.internal.helper.DatabaseTable |
getViewTable()INTERNAL: |
boolean |
hasViewTable()INTERNAL: |
boolean |
isExpressionBuilder()INTERNAL: |
Expression |
multipleTableCriteria()INTERNAL: Return the expression to join the main table of this node to any auxiliary tables. |
Expression |
normalize(oracle.toplink.internal.expressions.ExpressionNormalizer normalizer)INTERNAL: Normalize the expression into a printable structure. |
Expression |
rebuildOn(Expression newBase)INTERNAL: This expression is built on a different base than the one we want. |
void |
setQueryClass(java.lang.Class queryClass)INTERNAL: Set the class which this node represents. |
void |
setSession(oracle.toplink.publicinterface.Session session)INTERNAL: Set the session in which we expect this expression to be translated. |
void |
setStatement(oracle.toplink.internal.expressions.SQLSelectStatement statement)INTERNAL: Set the statement that expression is for. |
void |
setViewTable(oracle.toplink.internal.helper.DatabaseTable theTable)INTERNAL: This expression represents something read through a view table. |
Expression |
twistedForBaseAndContext(Expression newBase, Expression context)INTERNAL: Rebuild myself against the base, with the values of parameters supplied by the context expression. |
void |
writeDescriptionOn(java.io.BufferedWriter writer)INTERNAL: For debug printing purposes. |
| Methods inherited from class oracle.toplink.internal.expressions.ObjectExpression |
addDerivedExpression, additionalExpressionCriteria, anyOf, derivedExpressionNamed, derivedManualExpressionNamed, existingDerivedExpressionNamed, get, getAllowingNull, getFields, getManualQueryKey, isObjectExpression, newDerivedExpressionNamed, newManualDerivedExpressionNamed, postCopyIn, shouldUseOuterJoin |
| Methods inherited from class oracle.toplink.internal.expressions.DataExpression |
addDerivedField, addDerivedTable, clearAliases, copyCollection, existingDerivedField, existingDerivedTable, getAliasedField, getBaseExpression, getField, getField, getField, getMapping, getOwnedTables, getQueryKeyOrNull, getTable, getTable, getTableAliases, hasAddedMappingCriteria, hasBeenAliased, isAttribute, isDataExpression, iterateOn, mappingCriteria, newDerivedField, newDerivedTable, printSQL, setHasAddedMappingCriteria, setTableAliases, tableAliasesDescription, writeSubexpressionsTo |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ExpressionBuilder()
public ExpressionBuilder(java.lang.Class queryClass)
| Method Detail |
public oracle.toplink.internal.helper.DatabaseTable aliasForTable(oracle.toplink.internal.helper.DatabaseTable table)
public int assignTableAliasesStartingAt(int initialValue)
assignTableAliasesStartingAt in class Expressionpublic java.lang.String descriptionOfNodeType()
descriptionOfNodeType in class Expressionpublic boolean doesNotRepresentAnObjectInTheQuery()
public oracle.toplink.internal.helper.DatabaseTable getAliasedViewTable()
public ExpressionBuilder getBuilder()
public Descriptor getDescriptor()
public java.lang.Class getQueryClass()
public oracle.toplink.publicinterface.Session getSession()
getSession in class Expressionpublic oracle.toplink.internal.expressions.SQLSelectStatement getStatement()
public oracle.toplink.internal.helper.DatabaseTable getViewTable()
public boolean hasViewTable()
public boolean isExpressionBuilder()
isExpressionBuilder in class Expressionpublic Expression multipleTableCriteria()
public Expression normalize(oracle.toplink.internal.expressions.ExpressionNormalizer normalizer)
public Expression rebuildOn(Expression newBase)
rebuildOn in class ExpressionExpression.cloneUsing(Expression newBase)public void setQueryClass(java.lang.Class queryClass)
public void setSession(oracle.toplink.publicinterface.Session session)
public void setStatement(oracle.toplink.internal.expressions.SQLSelectStatement statement)
public void setViewTable(oracle.toplink.internal.helper.DatabaseTable theTable)
public Expression twistedForBaseAndContext(Expression newBase, Expression context)
twistedForBaseAndContext in class Expression
public void writeDescriptionOn(java.io.BufferedWriter writer)
throws java.io.IOException
writeDescriptionOn in class Expressionjava.io.IOException
|
| |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||