/** * INTERNAL: Find the alias for a given table. Handle the special case where we are bogus * and it should be aliased against our derived tables instead. */ public DatabaseTable aliasForTable(DatabaseTable table) { if (hasViewTable()) { return getAliasedViewTable(); } if (doesNotRepresentAnObjectInTheQuery()) { for (Enumeration e = derivedTables.elements(); e.hasMoreElements();) { TableExpression t = (TableExpression)e.nextElement(); DatabaseTable result = t.aliasForTable(table); if (result != null) { return result; } } } else { return super.aliasForTable(table); } return null;// No alias found in the derived tables }
/** * INTERNAL: Find the alias for a given table. Handle the special case where we are bogus * and it should be aliased against our derived tables instead. */ public DatabaseTable aliasForTable(DatabaseTable table) { if (hasViewTable()) { return getAliasedViewTable(); } if (doesNotRepresentAnObjectInTheQuery()) { for (Expression expression : this.derivedTables) { DatabaseTable result = expression.aliasForTable(table); if (result != null) { return result; } } } else { return super.aliasForTable(table); } return null; // No alias found in the derived tables }
/** * INTERNAL: Find the alias for a given table. Handle the special case where we are bogus * and it should be aliased against our derived tables instead. */ public DatabaseTable aliasForTable(DatabaseTable table) { if (hasViewTable()) { return getAliasedViewTable(); } if (doesNotRepresentAnObjectInTheQuery()) { for (Expression expression : this.derivedTables) { DatabaseTable result = expression.aliasForTable(table); if (result != null) { return result; } } } else { return super.aliasForTable(table); } return null; // No alias found in the derived tables }
if (doesNotRepresentAnObjectInTheQuery()) { return initialValue;
if (doesNotRepresentAnObjectInTheQuery()) { return initialValue;
if (doesNotRepresentAnObjectInTheQuery()) { return initialValue;
/** * Return whether to include all subclass fields in select statement or not. */ protected boolean shouldIncludeAllSubclassFields(SQLSelectStatement selectStatement) { ExpressionBuilder builder = selectStatement.getBuilder(); if (builder == null) { if (selectStatement.getWhereClause() == null) { return true; } else { builder = selectStatement.getWhereClause().getBuilder(); } } if (!builder.doesNotRepresentAnObjectInTheQuery()) { if (getDescriptor() != null && getDescriptor().hasInheritance()) { return !builder.isDowncast(getDescriptor(), getSession()); } } return true; }
/** * Return whether to include all subclass fields in select statement or not. */ protected boolean shouldIncludeAllSubclassFields(SQLSelectStatement selectStatement) { ExpressionBuilder builder = selectStatement.getBuilder(); if (builder == null) { if (selectStatement.getWhereClause() == null) { return true; } else { builder = selectStatement.getWhereClause().getBuilder(); } } if (!builder.doesNotRepresentAnObjectInTheQuery()) { if (getDescriptor() != null && getDescriptor().hasInheritance()) { return !builder.isDowncast(getDescriptor(), getSession()); } } return true; }
if (!builder.doesNotRepresentAnObjectInTheQuery()) { if (descriptor != null) { Class queryClass = builder.getQueryClass();
if (!builder.doesNotRepresentAnObjectInTheQuery()) { if (descriptor != null) { Class queryClass = builder.getQueryClass();
if (!builder.doesNotRepresentAnObjectInTheQuery()) { if (descriptor != null) { Class queryClass = builder.getQueryClass();