/** * INTERNAL: */ public Vector getOwnedTables() { if(isUsingOuterJoinForMultitableInheritance()) { return getDescriptor().getInheritancePolicy().getAllTables(); } else { return super.getOwnedTables(); } }
/** * INTERNAL: * Used in case outer joins should be printed in FROM clause. * Each of the additional tables mapped to expressions that joins it. */ public Map additionalExpressionCriteriaMap() { if (getDescriptor() == null) { return null; } HashMap tablesJoinExpressions = null; if(isUsingOuterJoinForMultitableInheritance()) { tablesJoinExpressions = new HashMap(); List childrenTables = getDescriptor().getInheritancePolicy().getChildrenTables(); for( int i=0; i < childrenTables.size(); i++) { DatabaseTable table = (DatabaseTable)childrenTables.get(i); Expression joinExpression = getDescriptor().getInheritancePolicy().getChildrenTablesJoinExpressions().get(table); if (getBaseExpression() != null){ joinExpression = getBaseExpression().twist(joinExpression, this); } else { joinExpression = twist(joinExpression, this); } tablesJoinExpressions.put(table, joinExpression); } } return tablesJoinExpressions; }
/** * INTERNAL: * Used in case outer joins should be printed in FROM clause. * Each of the additional tables mapped to expressions that joins it. */ public Map additionalExpressionCriteriaMap() { if (getDescriptor() == null) { return null; } HashMap tablesJoinExpressions = null; if(isUsingOuterJoinForMultitableInheritance()) { tablesJoinExpressions = new HashMap(); List childrenTables = getDescriptor().getInheritancePolicy().getChildrenTables(); for( int i=0; i < childrenTables.size(); i++) { DatabaseTable table = (DatabaseTable)childrenTables.get(i); Expression joinExpression = (Expression)getDescriptor().getInheritancePolicy().getChildrenTablesJoinExpressions().get(table); if (getBaseExpression() != null){ joinExpression = getBaseExpression().twist(joinExpression, this); } else { joinExpression = twist(joinExpression, this); } tablesJoinExpressions.put(table, joinExpression); } } return tablesJoinExpressions; }
/** * INTERNAL: * Used in case outer joins should be printed in FROM clause. * Each of the additional tables mapped to expressions that joins it. */ public Map additionalExpressionCriteriaMap() { if (getDescriptor() == null) { return null; } HashMap tablesJoinExpressions = null; if(isUsingOuterJoinForMultitableInheritance()) { tablesJoinExpressions = new HashMap(); List childrenTables = getDescriptor().getInheritancePolicy().getChildrenTables(); for( int i=0; i < childrenTables.size(); i++) { DatabaseTable table = (DatabaseTable)childrenTables.get(i); Expression joinExpression = getDescriptor().getInheritancePolicy().getChildrenTablesJoinExpressions().get(table); if (getBaseExpression() != null){ joinExpression = getBaseExpression().twist(joinExpression, this); } else { joinExpression = twist(joinExpression, this); } tablesJoinExpressions.put(table, joinExpression); } } return tablesJoinExpressions; }
numberOfFields = 2; } else if (objectExpression.isQueryKeyExpression() && objectExpression.isUsingOuterJoinForMultitableInheritance()) { numberOfFields = descriptor.getAllFields().size(); } else {
} else { if (objectExpression.isQueryKeyExpression() && objectExpression.isUsingOuterJoinForMultitableInheritance()) { numberOfFields = descriptor.getAllSelectionFields(nestedQuery).size(); } else if(objectExpression.isQueryKeyExpression() && objectExpression.getDescriptor() != null
} else { if (objectExpression.isQueryKeyExpression() && objectExpression.isUsingOuterJoinForMultitableInheritance()) { numberOfFields = descriptor.getAllSelectionFields(nestedQuery).size(); } else if(objectExpression.isQueryKeyExpression() && objectExpression.getDescriptor() != null
} else if ((descriptor.getHistoryPolicy() != null) && (getAsOfClause().getValue() != null)) { tables = descriptor.getHistoryPolicy().getHistoricalTables(); } else if (isUsingOuterJoinForMultitableInheritance()) { tables = descriptor.getInheritancePolicy().getAllTables(); } else {
} else if ((descriptor.getHistoryPolicy() != null) && (getAsOfClause().getValue() != null)) { tables = descriptor.getHistoryPolicy().getHistoricalTables(); } else if (isUsingOuterJoinForMultitableInheritance()) { tables = descriptor.getInheritancePolicy().getAllTables(); } else {
/** * INTERNAL: * Return the expression to join the main table of this node to any auxiliary tables. */ public Expression additionalExpressionCriteria() { if (getDescriptor() == null) { return null; } Expression criteria = getDescriptor().getQueryManager().getAdditionalJoinExpression(); if(getSession().getPlatform().shouldPrintOuterJoinInWhereClause()) { if(isUsingOuterJoinForMultitableInheritance()) { Expression childrenCriteria = getDescriptor().getInheritancePolicy().getChildrenJoinExpression(); childrenCriteria = getBaseExpression().twist(childrenCriteria, this); childrenCriteria.convertToUseOuterJoin(); if(criteria == null) { criteria = childrenCriteria; } else { criteria = criteria.and(childrenCriteria); } } } return criteria; }
/** * INTERNAL: * Return the expression to join the main table of this node to any auxiliary tables. */ public Expression additionalExpressionCriteria() { if (getDescriptor() == null) { return null; } Expression criteria = getDescriptor().getQueryManager().getAdditionalJoinExpression(); if(getSession().getPlatform().shouldPrintOuterJoinInWhereClause()) { if(isUsingOuterJoinForMultitableInheritance()) { Expression childrenCriteria = getDescriptor().getInheritancePolicy().getChildrenJoinExpression(); childrenCriteria = getBaseExpression().twist(childrenCriteria, this); childrenCriteria.convertToUseOuterJoin(); if(criteria == null) { criteria = childrenCriteria; } else { criteria = criteria.and(childrenCriteria); } } } return criteria; }
/** * INTERNAL: * Return the expression to join the main table of this node to any auxiliary tables. */ public Expression additionalExpressionCriteria() { if (getDescriptor() == null) { return null; } Expression criteria = getDescriptor().getQueryManager().getAdditionalJoinExpression(); if(getSession().getPlatform().shouldPrintOuterJoinInWhereClause()) { if(isUsingOuterJoinForMultitableInheritance()) { Expression childrenCriteria = getDescriptor().getInheritancePolicy().getChildrenJoinExpression(); childrenCriteria = getBaseExpression().twist(childrenCriteria, this); childrenCriteria.convertToUseOuterJoin(); if(criteria == null) { criteria = childrenCriteria; } else { criteria = criteria.and(childrenCriteria); } } } return criteria; }
boolean parentUsingOuterJoinForMultitableInheritance = typeExpressionBase.isUsingOuterJoinForMultitableInheritance();
boolean parentUsingOuterJoinForMultitableInheritance = typeExpressionBase.isUsingOuterJoinForMultitableInheritance();