Methods Summary |
---|
public void | addDerivedField(oracle.toplink.essentials.expressions.Expression addThis)
if (derivedFields == null) {
derivedFields = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(4);
}
derivedFields.addElement(addThis);
|
public void | addDerivedTable(oracle.toplink.essentials.expressions.Expression addThis)
if (derivedTables == null) {
derivedTables = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(4);
}
derivedTables.addElement(addThis);
|
public oracle.toplink.essentials.internal.helper.DatabaseTable | aliasForTable(oracle.toplink.essentials.internal.helper.DatabaseTable table)INTERNAL:
Find the alias for a given table
if (tableAliases == null) {
if (getBaseExpression() == null) {
return null;
}
return getBaseExpression().aliasForTable(table);
}
return tableAliases.keyAtValue(table);
|
protected void | assignAlias(java.lang.String name, oracle.toplink.essentials.internal.helper.DatabaseTable table)INTERNAL:
Alias a particular table within this node
assignAlias(new DatabaseTable(name), table);
|
protected void | assignAlias(oracle.toplink.essentials.internal.helper.DatabaseTable alias, oracle.toplink.essentials.internal.helper.DatabaseTable table)INTERNAL:
Alias a particular table within this node
if (tableAliases == null) {
tableAliases = new TableAliasLookup();
}
tableAliases.put(alias, table);
|
public void | clearAliases()INTERNAL:
tableAliases = null;
|
public java.util.Vector | copyCollection(java.util.Vector in, java.util.Dictionary alreadyDone)
if (in == null) {
return null;
}
Vector result = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(in.size());
for (Enumeration e = in.elements(); e.hasMoreElements();) {
Expression exp = (Expression)e.nextElement();
result.addElement(exp.copiedVersionFrom(alreadyDone));
}
return result;
|
public oracle.toplink.essentials.expressions.Expression | existingDerivedField(oracle.toplink.essentials.internal.helper.DatabaseField field)INTERNAL:
if (derivedFields == null) {
return null;
}
for (Enumeration e = derivedFields.elements(); e.hasMoreElements();) {
FieldExpression exp = (FieldExpression)e.nextElement();
if (exp.getField().equals(field)) {
return exp;
}
}
return null;
|
public oracle.toplink.essentials.expressions.Expression | existingDerivedTable(oracle.toplink.essentials.internal.helper.DatabaseTable table)INTERNAL:
if (derivedTables == null) {
return null;
}
for (Enumeration e = derivedTables.elements(); e.hasMoreElements();) {
TableExpression exp = (TableExpression)e.nextElement();
if (exp.getTable().equals(table)) {
return exp;
}
}
return null;
|
public oracle.toplink.essentials.internal.helper.DatabaseField | getAliasedField()INTERNAL:
Return the field appropriately aliased
return null;
|
public oracle.toplink.essentials.expressions.Expression | getBaseExpression()
return baseExpression;
|
public oracle.toplink.essentials.expressions.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)
if (getBaseExpression() == null) {
return null;
}
return getBaseExpression().getBuilder();
|
public oracle.toplink.essentials.descriptors.ClassDescriptor | getDescriptor()
return null;
|
public oracle.toplink.essentials.internal.helper.DatabaseField | getField()INTERNAL:
return null;
|
public oracle.toplink.essentials.expressions.Expression | getField(java.lang.String fieldName)
DatabaseField field = new DatabaseField(fieldName);
return getField(field);
|
public oracle.toplink.essentials.expressions.Expression | getField(oracle.toplink.essentials.internal.helper.DatabaseField field)
Expression existing = existingDerivedField(field);
if (existing != null) {
return existing;
}
return newDerivedField(field);
|
public oracle.toplink.essentials.mappings.DatabaseMapping | getMapping()
if (getBaseExpression() == null) {
return null;
}
ClassDescriptor aDescriptor = ((DataExpression)getBaseExpression()).getDescriptor();
if (aDescriptor == null) {
return null;
}
return aDescriptor.getObjectBuilder().getMappingForAttributeName(getName());
|
public java.util.Vector | getOwnedTables()INTERNAL:
if (getDescriptor() == null) {
return null;
} else {
if (getDescriptor().isAggregateDescriptor()) {
return null;
} else {
return getDescriptor().getTables();
}
}
|
public oracle.toplink.essentials.querykeys.QueryKey | getQueryKeyOrNull()
return null;
|
public oracle.toplink.essentials.expressions.Expression | getTable(java.lang.String tableName)
DatabaseTable table = new DatabaseTable(tableName);
return getTable(table);
|
public oracle.toplink.essentials.expressions.Expression | getTable(oracle.toplink.essentials.internal.helper.DatabaseTable table)
Expression existing = existingDerivedTable(table);
if (existing != null) {
return existing;
}
return newDerivedTable(table);
|
public oracle.toplink.essentials.internal.expressions.TableAliasLookup | getTableAliases()INTERNAL:
Return the aliases used. For CR#2456 must never lazily initialize as also used for Expression identity.
return tableAliases;
|
public boolean | hasBeenAliased()
return ((tableAliases != null) && (tableAliases.size() != 0));
|
public 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.
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.
return hasBeenNormalized;
|
protected boolean | hasDerivedFields()
return derivedFields != null;
|
protected boolean | hasDerivedTables()
return derivedTables != null;
|
public boolean | isAttribute()INTERNAL:
return false;
|
public boolean | isDataExpression()
return true;
|
public void | iterateOn(oracle.toplink.essentials.internal.expressions.ExpressionIterator iterator)INTERNAL:
For iterating using an inner class
super.iterateOn(iterator);
if (baseExpression != null) {
baseExpression.iterateOn(iterator);
}
|
public oracle.toplink.essentials.expressions.Expression | mappingCriteria()
return null;
|
public oracle.toplink.essentials.expressions.Expression | newDerivedField(oracle.toplink.essentials.internal.helper.DatabaseField field)INTERNAL:
FieldExpression result = new FieldExpression(field, this);
addDerivedField(result);
return result;
|
public oracle.toplink.essentials.expressions.Expression | newDerivedTable(oracle.toplink.essentials.internal.helper.DatabaseTable table)INTERNAL:
TableExpression result = new TableExpression(table);
result.setBaseExpression(this);
addDerivedTable(result);
return result;
|
public oracle.toplink.essentials.expressions.Expression | normalize(oracle.toplink.essentials.internal.expressions.ExpressionNormalizer normalizer)INTERNAL:
Normalize the expression into a printable structure.
Any joins must be added to form a new root.
if (getBaseExpression() != null) {
// First normalize the base.
setBaseExpression(getBaseExpression().normalize(normalizer));
}
return super.normalize(normalizer);
|
protected void | postCopyIn(java.util.Dictionary alreadyDone)INTERNAL:
Used for cloning.
super.postCopyIn(alreadyDone);
clearAliases();
if (baseExpression != null) {
baseExpression = baseExpression.copiedVersionFrom(alreadyDone);
}
derivedFields = copyCollection(derivedFields, alreadyDone);
derivedTables = copyCollection(derivedTables, alreadyDone);
|
public void | printSQL(oracle.toplink.essentials.internal.expressions.ExpressionSQLPrinter printer)INTERNAL:
Print SQL onto the stream, using the ExpressionPrinter for context
printer.printField(getAliasedField());
|
protected void | setBaseExpression(oracle.toplink.essentials.expressions.Expression e)
baseExpression = e;
|
public void | setHasBeenNormalized(boolean value)
hasBeenNormalized = value;
|
public void | setTableAliases(oracle.toplink.essentials.internal.expressions.TableAliasLookup tableAliases)INTERNAL:
For CR#2456, Table identity involves having two tables sharing the same
aliasing table.
if (this.tableAliases == null) {
this.tableAliases = tableAliases;
}
|
public java.lang.String | tableAliasesDescription()
if (tableAliases == null) {
return "";
}
return tableAliases.toString();
|
public void | writeSubexpressionsTo(java.io.BufferedWriter writer, int indent)Print the base for debuggin purposes.
if (getBaseExpression() != null) {
getBaseExpression().toString(writer, indent);
}
|