/** * INTERNAL: * Also copy over the sub-select if present. */ @Override protected void postCopyIn(Map alreadyDone) { super.postCopyIn(alreadyDone); if (this.subSelect != null) { this.subSelect = (SubSelectExpression)this.subSelect.copiedVersionFrom(alreadyDone); this.table = new SubSelectDatabaseTable(subSelect); } }
public Expression get(String attributeName, Vector arguments) { Expression operatorExpression = super.get(attributeName, arguments); if (operatorExpression != null) { return operatorExpression; } QueryKeyExpression result = derivedExpressionNamed(attributeName); result.doNotUseOuterJoin(); return result; }
/** * INTERNAL: */ public Expression newDerivedTable(DatabaseTable table) { TableExpression result = new TableExpression(table); result.setBaseExpression(this); addDerivedTable(result); return result; }
/** * INTERNAL: * Like QueryKeyExpression, return the descriptor for the class type used, null if one can't be determined yet. * Should only be called when a session is already set. */ @Override public ClassDescriptor getContainingDescriptor() { return ((ObjectExpression)getBaseExpression()).getDescriptor(); }
/** * INTERNAL: * Print SQL onto the stream, using the ExpressionPrinter for context */ @Override public void printSQL(ExpressionSQLPrinter printer) { printer.printField(getAliasedField()); }
public QueryKeyExpression newDerivedExpressionNamed(String attributeName) { QueryKeyExpression result = new QueryKeyExpression(attributeName, this); addDerivedExpression(result); return result; }
/** * INTERNAL: * Used for cloning. */ @Override protected void postCopyIn(Map alreadyDone) { super.postCopyIn(alreadyDone); if (this.index != null) { this.index = (IndexExpression)this.index.copiedVersionFrom(alreadyDone); } }
public Expression mappingCriteria(Expression base) { if (typeExpressionBase.isQueryKeyExpression()) { return ((QueryKeyExpression)typeExpressionBase).mappingCriteria(base); } return null; }
/** * INTERNAL: * Find the alias for a given table. A TableEntry is a place holder and its base expression holds * all the relevant information. Get the alias from the baseExpression */ @Override public DatabaseTable aliasForTable(DatabaseTable table) { return ((DataExpression)getBaseExpression()).aliasForTable(table); }
public Expression newManualDerivedExpressionNamed(String attributeName, ClassDescriptor aDescriptor) { QueryKeyExpression result = new ManualQueryKeyExpression(attributeName, this, aDescriptor); addDerivedExpression(result); return result; }
/** * This method will append the for update clause to the end of the * select statement. */ public void appendForUpdateClause(ExpressionSQLPrinter printer) { if (getForUpdateClause() != null) { getForUpdateClause().printSQL(printer, this); } }
/** * INTERNAL: */ public Expression newDerivedField(DatabaseField field) { FieldExpression result = new FieldExpression(field, this); addDerivedField(result); return result; }
/** * INTERNAL: * For CR#2456 if this is part of an objExp.equal(objExp), do not need to add * additional expressions to normalizer both times, and the foreign key join * replaces the equal expression. */ public Expression normalize(ExpressionNormalizer normalizer, Vector foreignKeyJoinPointer) { if (hasBeenNormalized()) { return this; } return super.normalize(normalizer); }
public void writeSubexpressionsTo(BufferedWriter writer, int indent) throws IOException { if (this.typeExpressionBase != null) { this.typeExpressionBase.toString(writer, indent); } else { super.writeSubexpressionsTo(writer, indent); } }
public void validateNode() { typeExpressionBase.validateNode(); //getDescriptor currently checks if the descriptor can be found for the castclass. //We may want to check that this is a downcast in future getDescriptor(); }
@Override protected void postCopyIn(Map alreadyDone) { super.postCopyIn(alreadyDone); this.typeExpressionBase = (ObjectExpression)typeExpressionBase.copiedVersionFrom(alreadyDone); }
/** * INTERNAL: * Also copy over the sub-select if present. */ @Override protected void postCopyIn(Map alreadyDone) { super.postCopyIn(alreadyDone); if (this.subSelect != null) { this.subSelect = (SubSelectExpression)this.subSelect.copiedVersionFrom(alreadyDone); this.table = new SubSelectDatabaseTable(subSelect); } }
public QueryKeyExpression newDerivedExpressionNamed(String attributeName) { QueryKeyExpression result = new QueryKeyExpression(attributeName, this); addDerivedExpression(result); return result; }
/** * INTERNAL: * Used for cloning. */ protected void postCopyIn(Map alreadyDone) { super.postCopyIn(alreadyDone); if(index != null) { index = (IndexExpression)index.copiedVersionFrom(alreadyDone); } }