/** * INTERNAL: * Normalize an expression mapping all of the descriptor's tables to the view. * This is used to allow a descriptor to read from a view, but write to tables. * This is used in the multiple table and subclasses read so all of the descriptor's * possible tables must be mapped to the view. */ public void normalizeForView(AbstractSession theSession, ClassDescriptor theDescriptor, Map clonedExpressions) { ExpressionBuilder builder; // bug 3878553 - alias all view selects. setRequiresAliases(true); if (getWhereClause() != null) { builder = getWhereClause().getBuilder(); } else { builder = new ExpressionBuilder(); setBuilder(builder); } builder.setViewTable((DatabaseTable)getTables().firstElement()); normalize(theSession, theDescriptor, clonedExpressions); }
/** * INTERNAL: * Normalize an expression mapping all of the descriptor's tables to the view. * This is used to allow a descriptor to read from a view, but write to tables. * This is used in the multiple table and subclasses read so all of the descriptor's * possible tables must be mapped to the view. */ public void normalizeForView(AbstractSession theSession, ClassDescriptor theDescriptor, Map clonedExpressions) { ExpressionBuilder builder; // bug 3878553 - alias all view selects. setRequiresAliases(true); if (getWhereClause() != null) { builder = getWhereClause().getBuilder(); } else { builder = new ExpressionBuilder(); setBuilder(builder); } builder.setViewTable(getTables().get(0)); normalize(theSession, theDescriptor, clonedExpressions); }
/** * INTERNAL: * Normalize an expression mapping all of the descriptor's tables to the view. * This is used to allow a descriptor to read from a view, but write to tables. * This is used in the multiple table and subclasses read so all of the descriptor's * possible tables must be mapped to the view. */ public void normalizeForView(AbstractSession theSession, ClassDescriptor theDescriptor, Map clonedExpressions) { ExpressionBuilder builder; // bug 3878553 - alias all view selects. setRequiresAliases(true); if (getWhereClause() != null) { builder = getWhereClause().getBuilder(); } else { builder = new ExpressionBuilder(); setBuilder(builder); } builder.setViewTable(getTables().get(0)); normalize(theSession, theDescriptor, clonedExpressions); }
setBuilder(new ExpressionBuilder()); } else { setBuilder(getWhereClause().getBuilder());
setBuilder(new ExpressionBuilder()); } else { setBuilder(getWhereClause().getBuilder());
setBuilder(new ExpressionBuilder()); } else { setBuilder(getWhereClause().getBuilder());
selectStatement.setBuilder((ExpressionBuilder)query.getExpressionBuilder().copiedVersionFrom(clonedExpressions));
selectStatement.setBuilder((ExpressionBuilder)query.getExpressionBuilder().copiedVersionFrom(clonedExpressions));
selectStatement.setBuilder((ExpressionBuilder)query.getExpressionBuilder().copiedVersionFrom(clonedExpressions));