/** */ public Object newCount(int line, int column, boolean distinct, Object arg) { CountNode node = new CountNode(); node.setLeft((Node)arg); node.setDistinct(distinct); setPosition(node, line, column); return node; }
/** * 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 * Validate node and calculate its type. */ public void validate(ParseTreeContext context) { if (left != null) { left.validate(context); TypeHelper typeHelper = context.getTypeHelper(); setType(typeHelper.getLongClassType()); } }
/** * 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 * Validate node and calculate its type. */ public void validate(ParseTreeContext context) { if (left != null) { left.validate(context); TypeHelper typeHelper = context.getTypeHelper(); setType(typeHelper.getLongClassType()); } }
/** */ public Object newCount(int line, int column, boolean distinct, Object arg) { CountNode node = new CountNode(); node.setLeft((Node)arg); node.setDistinct(distinct); setPosition(node, line, column); return node; }
/** * 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 * Validate node and calculate its type. */ public void validate(ParseTreeContext context) { if (left != null) { left.validate(context); TypeHelper typeHelper = context.getTypeHelper(); setType(typeHelper.getLongClassType()); } }
/** */ public Object newCount(int line, int column, boolean distinct, Object arg) { CountNode node = new CountNode(); node.setLeft((Node)arg); node.setDistinct(distinct); setPosition(node, line, column); return node; }