/** * INTERNAL * Apply this node to the passed query */ public void applyToQuery(ObjectLevelReadQuery theQuery, GenerationContext context) { if (theQuery.isReportQuery()){ ReportQuery reportQuery = (ReportQuery)theQuery; reportQuery.addAttribute("date", generateExpression(context), type); } }
/** * INTERNAL * Apply this node to the passed query */ public void applyToQuery(ObjectLevelReadQuery theQuery, GenerationContext context) { if (theQuery.isReportQuery()) { ReportQuery reportQuery = (ReportQuery)theQuery; reportQuery.addAttribute("CONSTANT", generateExpression(context)); } }
/** * INTERNAL * Apply this node to the passed query */ public void applyToQuery(ObjectLevelReadQuery theQuery, GenerationContext context) { if (theQuery.isReportQuery()){ ReportQuery reportQuery = (ReportQuery)theQuery; reportQuery.addAttribute("date", generateExpression(context), type); } }
/** * INTERNAL * Apply this node to the passed query */ public void applyToQuery(ObjectLevelReadQuery theQuery, GenerationContext context) { if (theQuery.isReportQuery()) { ReportQuery reportQuery = (ReportQuery)theQuery; reportQuery.addAttribute(resolveAttribute(), generateExpression(context)); } }
/** * INTERNAL * Apply this node to the passed query */ public void applyToQuery(ObjectLevelReadQuery theQuery, GenerationContext context) { if (theQuery.isReportQuery()) { ReportQuery reportQuery = (ReportQuery)theQuery; reportQuery.addAttribute("minus", generateExpression(context), (Class)getType()); } }
/** * INTERNAL * Apply this node to the passed query */ public void applyToQuery(ObjectLevelReadQuery theQuery, GenerationContext context) { if (theQuery.isReportQuery()) { ReportQuery reportQuery = (ReportQuery)theQuery; reportQuery.addAttribute("multiply", generateExpression(context), (Class)getType()); } }
/** * INTERNAL * Apply this node to the passed query */ public void applyToQuery(ObjectLevelReadQuery theQuery, GenerationContext context) { if (theQuery.isReportQuery()) { ReportQuery reportQuery = (ReportQuery)theQuery; reportQuery.addAttribute("divide", generateExpression(context), (Class)getType()); } }
/** * INTERNAL * Add the having expression to the passed query */ public void addHavingToQuery(ObjectLevelReadQuery theQuery, GenerationContext context) { if (theQuery.isReportQuery()) { Expression havingExpression = getHaving().generateExpression(context); ((ReportQuery)theQuery).setHavingExpression(havingExpression); } }
/** * INTERNAL * Apply this node to the passed query */ public void applyToQuery(ObjectLevelReadQuery theQuery, GenerationContext context) { if (theQuery.isReportQuery()) { ReportQuery reportQuery = (ReportQuery)theQuery; reportQuery.addAttribute("minus", generateExpression(context), (Class)getType()); } }
/** * INTERNAL * Apply this node to the passed query */ public void applyToQuery(ObjectLevelReadQuery theQuery, GenerationContext context) { if (theQuery.isReportQuery()) { ReportQuery reportQuery = (ReportQuery)theQuery; reportQuery.addAttribute(resolveAttribute(), generateExpression(context)); } }
/** * INTERNAL * Add the having expression to the passed query */ public void addHavingToQuery(ObjectLevelReadQuery theQuery, GenerationContext context) { if (theQuery.isReportQuery()) { Expression havingExpression = getHaving().generateExpression(context); ((ReportQuery)theQuery).setHavingExpression(havingExpression); } }
/** * INTERNAL * Apply this node to the passed query */ public void applyToQuery(ObjectLevelReadQuery theQuery, GenerationContext context) { if (theQuery.isReportQuery()) { ReportQuery reportQuery = (ReportQuery)theQuery; reportQuery.addAttribute(resolveAttribute(), generateExpression(context)); } }
/** * INTERNAL * Apply this node to the passed query */ public void applyToQuery(ObjectLevelReadQuery theQuery, GenerationContext context) { if (theQuery.isReportQuery()) { ReportQuery reportQuery = (ReportQuery)theQuery; reportQuery.addAttribute("divide", generateExpression(context), (Class)getType()); } }
/** * INTERNAL * Apply this node to the passed query */ public void applyToQuery(ObjectLevelReadQuery theQuery, GenerationContext context) { if (theQuery.isReportQuery()) { ReportQuery reportQuery = (ReportQuery)theQuery; reportQuery.addAttribute(resolveAttribute(), generateExpression(context), (Class)getType()); } }
/** * INTERNAL * Apply this node to the passed query */ public void applyToQuery(ObjectLevelReadQuery theQuery, GenerationContext context) { if (theQuery.isReportQuery()) { ReportQuery reportQuery = (ReportQuery)theQuery; reportQuery.addAttribute(resolveAttribute(), generateExpression(context), calculateReturnType(context)); } }
/** * INTERNAL * Apply this node to the passed query */ public void applyToQuery(ObjectLevelReadQuery theQuery, GenerationContext context) { if (theQuery.isReportQuery()){ ReportQuery reportQuery = (ReportQuery)theQuery; reportQuery.addAttribute(resolveAttribute(), generateExpression(context)); reportQuery.dontRetrievePrimaryKeys(); } }
private AbstractObjectLevelReadQueryVisitor buildVisitor(ObjectLevelReadQuery query) { if (query.isReportQuery()) { return new ReportQueryVisitor(queryContext, (ReportQuery) query); } if (query.isReadAllQuery()) { return new ReadAllQueryVisitor(queryContext, (ReadAllQuery) query); } return new ObjectLevelReadQueryVisitor(queryContext, query); }
/** * INTERNAL * Apply this node to the passed query */ public void applyToQuery(ObjectLevelReadQuery theQuery, GenerationContext context) { if (theQuery.isReportQuery()) { ReportQuery reportQuery = (ReportQuery)theQuery; String attrName = getLeft().isDotNode() ? resolveAttribute() : "COUNT"; reportQuery.addAttribute(attrName, generateExpression(context), Long.class); } }
/** * INTERNAL * Apply this node to the passed query */ public void applyToQuery(ObjectLevelReadQuery theQuery, GenerationContext context) { if (theQuery.isReportQuery()) { ReportQuery reportQuery = (ReportQuery)theQuery; reportQuery.addAttribute("size", getLeft().generateExpression(context).count(), (Class)getType()); reportQuery.addGrouping(getLeft().getLeft().generateExpression(context)); } }
/** * INTERNAL * Apply this node to the passed query */ public void applyToQuery(ObjectLevelReadQuery theQuery, GenerationContext context) { if (theQuery.isReportQuery()) { ReportQuery reportQuery = (ReportQuery)theQuery; reportQuery.addAttribute("size", getLeft().generateExpression(context).count(), (Class)getType()); reportQuery.addGrouping(getLeft().getLeft().generateExpression(context)); } }