public abstract class DataExpression extends Expression
| Modifier and Type | Field and Description |
|---|---|
protected Expression |
baseExpression |
protected java.util.Vector |
derivedFields |
protected java.util.Vector |
derivedTables |
protected boolean |
hasBeenNormalized |
protected TableAliasLookup |
tableAliases |
currentAlias, lastTable, selectIfOrderedBy| Constructor and Description |
|---|
DataExpression()
DataExpression constructor comment.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDerivedField(Expression addThis) |
void |
addDerivedTable(Expression addThis) |
DatabaseTable |
aliasForTable(DatabaseTable table)
INTERNAL:
Find the alias for a given table
|
protected void |
assignAlias(DatabaseTable alias,
DatabaseTable table)
INTERNAL:
Alias a particular table within this node
|
protected void |
assignAlias(java.lang.String name,
DatabaseTable table)
INTERNAL:
Alias a particular table within this node
|
void |
clearAliases()
INTERNAL:
|
java.util.Vector |
copyCollection(java.util.Vector in,
java.util.Dictionary alreadyDone) |
Expression |
existingDerivedField(DatabaseField field)
INTERNAL:
|
Expression |
existingDerivedTable(DatabaseTable table)
INTERNAL:
|
DatabaseField |
getAliasedField()
INTERNAL:
Return the field appropriately aliased
|
Expression |
getBaseExpression() |
ExpressionBuilder |
getBuilder()
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)
|
ClassDescriptor |
getDescriptor() |
DatabaseField |
getField()
INTERNAL:
|
Expression |
getField(DatabaseField field)
ADVANCED: Return an expression representing a field in a data-level query.
|
Expression |
getField(java.lang.String fieldName)
ADVANCED:
Return an expression representing a field in a data-level query.
|
DatabaseMapping |
getMapping() |
java.util.Vector |
getOwnedTables()
INTERNAL:
|
QueryKey |
getQueryKeyOrNull() |
Expression |
getTable(DatabaseTable table)
ADVANCED: Return an expression representing a table in a data-level query.
|
Expression |
getTable(java.lang.String tableName)
ADVANCED: Return an expression representing a table in a data-level query.
|
TableAliasLookup |
getTableAliases()
INTERNAL:
Return the aliases used.
|
boolean |
hasBeenAliased()
INTERNAL:
Answers if the database tables associated with this expression have been
aliased.
|
boolean |
hasBeenNormalized()
INTERNAL:
Did the normalizer already add additional joins to the where clause due to
this query key representing a foreign reference mapping?
This insures that join criteria (for any query key expression) is not
added twice.
|
protected boolean |
hasDerivedFields() |
protected boolean |
hasDerivedTables() |
boolean |
isAttribute()
INTERNAL:
|
boolean |
isDataExpression()
INTERNAL:
|
void |
iterateOn(ExpressionIterator iterator)
INTERNAL:
For iterating using an inner class
|
Expression |
mappingCriteria() |
Expression |
newDerivedField(DatabaseField field)
INTERNAL:
|
Expression |
newDerivedTable(DatabaseTable table)
INTERNAL:
|
Expression |
normalize(ExpressionNormalizer normalizer)
INTERNAL:
Normalize the expression into a printable structure.
|
protected void |
postCopyIn(java.util.Dictionary alreadyDone)
INTERNAL:
Used for cloning.
|
void |
printSQL(ExpressionSQLPrinter printer)
INTERNAL:
Print SQL onto the stream, using the ExpressionPrinter for context
|
protected void |
setBaseExpression(Expression e) |
void |
setHasBeenNormalized(boolean value) |
void |
setTableAliases(TableAliasLookup tableAliases)
INTERNAL:
For CR#2456, Table identity involves having two tables sharing the same
aliasing table.
|
java.lang.String |
tableAliasesDescription() |
void |
writeSubexpressionsTo(java.io.BufferedWriter writer,
int indent)
Print the base for debuggin purposes.
|
addDate, addDate, addMonths, addMonths, all, all, all, all, all, all, all, all, all, all, all, all, allOf, and, any, any, any, any, any, any, any, any, any, any, any, any, anyOf, anyOfAllowingNone, ascending, asciiValue, assignTableAliasesStartingAt, average, between, between, between, between, between, between, between, between, between, caseStatement, clone, cloneUsing, concat, containsAllKeyWords, containsAnyKeyWords, containsSubstring, containsSubstring, containsSubstringIgnoringCase, containsSubstringIgnoringCase, convertNodeToUseOuterJoin, convertToUseOuterJoin, copiedVersionFrom, count, create, create, createWithBaseLast, currentDate, currentDateDate, currentTime, currentTimeStamp, dateDifference, dateDifference, dateName, datePart, dateToString, decode, descending, descriptionOfNodeType, detectExpression, difference, distinct, doesConform, doesConform, equal, equal, equal, equal, equal, equal, equal, equal, equal, equal, equalOuterJoin, equalOuterJoin, equalsIgnoreCase, equalsIgnoreCase, exists, existsNode, extract, extractPrimaryKeyValues, extractValue, from, fromConstant, fromLiteral, get, get, getAllowingNull, getAllowingNull, getClonedField, getFields, getFieldValue, getFunction, getFunction, getFunction, getFunction, getFunctionWithArguments, getName, getNumberVal, getOperator, getOperator, getParameter, getParameter, getParameter, getSession, getStringVal, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, hasAsOfClause, hexToRaw, ifNull, in, in, in, in, in, in, in, in, in, in, in, in, indexOf, isCompoundExpression, isConstantExpression, isEmpty, isExpressionBuilder, isFieldExpression, isFragment, isFunctionExpression, isLiteralExpression, isLogicalExpression, isNull, isObjectExpression, isParameterExpression, isQueryKeyExpression, isRelationExpression, isTableExpression, isValueExpression, lastDay, leftPad, leftPad, leftTrim, leftTrim, length, lessThan, lessThan, lessThan, lessThan, lessThan, lessThan, lessThan, lessThan, lessThan, lessThan, lessThanEqual, lessThanEqual, lessThanEqual, lessThanEqual, lessThanEqual, lessThanEqual, lessThanEqual, lessThanEqual, lessThanEqual, lessThanEqual, like, like, like, like, likeIgnoreCase, likeIgnoreCase, literal, locate, locate, locate, maximum, minimum, monthsBetween, newTime, nextDay, noneOf, not, notBetween, notBetween, notBetween, notBetween, notBetween, notBetween, notBetween, notBetween, notBetween, notEmpty, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, notExists, notIn, notIn, notIn, notIn, notIn, notIn, notIn, notIn, notIn, notIn, notIn, notIn, notLike, notLike, notNull, or, performOperator, postfixSQL, prefixSQL, printJava, printSQLWithoutConversion, rebuildOn, ref, registerIn, replace, replicate, replicate, resetCache, reverse, right, right, rightPad, rightPad, rightTrim, rightTrim, roundDate, selectIfOrderedBy, setLocalBase, setSelectIfOrderedBy, shallowClone, size, some, some, some, some, some, some, some, some, some, some, some, some, standardDeviation, subQuery, substring, substring, sum, toChar, toChar, toCharacter, toDate, toLowerCase, toNumber, toString, toString, toUpperCase, toUppercaseCasedWords, translate, trim, trim, truncateDate, twist, twistedForBaseAndContext, validateNode, value, value, value, value, value, value, value, value, value, value, valueFromObject, valueFromObject, variance, writeDescriptionOn, writeField, writeFieldsprotected java.util.Vector derivedTables
protected java.util.Vector derivedFields
protected Expression baseExpression
protected boolean hasBeenNormalized
protected TableAliasLookup tableAliases
public void addDerivedField(Expression addThis)
public void addDerivedTable(Expression addThis)
public DatabaseTable aliasForTable(DatabaseTable table)
aliasForTable in class Expressionprotected void assignAlias(java.lang.String name,
DatabaseTable table)
assignAlias in class Expressionprotected void assignAlias(DatabaseTable alias, DatabaseTable table)
public void clearAliases()
public java.util.Vector copyCollection(java.util.Vector in,
java.util.Dictionary alreadyDone)
public Expression existingDerivedField(DatabaseField field)
public Expression existingDerivedTable(DatabaseTable table)
public DatabaseField getAliasedField()
public Expression getBaseExpression()
public ExpressionBuilder getBuilder()
getBuilder in class Expressionpublic ClassDescriptor getDescriptor()
public DatabaseField getField()
public Expression getField(java.lang.String fieldName)
ExpressionExample:
builder.getField("ADDR_ID").greaterThan(100); builder.getTable("PROJ_EMP").getField("TYPE").equal("S");
getField in class Expressionpublic Expression getField(DatabaseField field)
ExpressionExample:
builder.getField(aField).greaterThan(100);
getField in class Expressionpublic DatabaseMapping getMapping()
public java.util.Vector getOwnedTables()
getOwnedTables in class Expressionpublic QueryKey getQueryKeyOrNull()
public Expression getTable(java.lang.String tableName)
ExpressionExample:
builder.getTable("PROJ_EMP").getField("TYPE").equal("S");
getTable in class Expressionpublic Expression getTable(DatabaseTable table)
ExpressionExample:
builder.getTable(linkTable).getField("TYPE").equal("S");
getTable in class Expressionpublic TableAliasLookup getTableAliases()
getTableAliases in class Expressionpublic boolean hasBeenNormalized()
New meaning: DataExpressions are often iterated on multiple times during normalize, but Function/Relation expressions only once. Adding a has been normalized flag improves performance and is required in some applications, such as have temporal query criteria been added.
public boolean hasBeenAliased()
ExpressionhasBeenAliased in class Expressionprotected boolean hasDerivedFields()
protected boolean hasDerivedTables()
public boolean isAttribute()
public boolean isDataExpression()
ExpressionisDataExpression in class Expressionpublic void iterateOn(ExpressionIterator iterator)
iterateOn in class Expressionpublic Expression mappingCriteria()
public Expression newDerivedField(DatabaseField field)
public Expression newDerivedTable(DatabaseTable table)
public Expression normalize(ExpressionNormalizer normalizer)
normalize in class Expressionprotected void postCopyIn(java.util.Dictionary alreadyDone)
postCopyIn in class Expressionpublic void printSQL(ExpressionSQLPrinter printer)
printSQL in class Expressionprotected void setBaseExpression(Expression e)
public void setHasBeenNormalized(boolean value)
public void setTableAliases(TableAliasLookup tableAliases)
public java.lang.String tableAliasesDescription()
public void writeSubexpressionsTo(java.io.BufferedWriter writer,
int indent)
throws java.io.IOException
writeSubexpressionsTo in class Expressionjava.io.IOException