/** * Convert the criteria from names using document identifiers to names using * result set (i.e. mapping class) identifiers. * @param simpleCrit Criteria to convert * @param rootNode Root of mapping node tree * @return Criteria Converted criteria * @throws QueryPlannerException if simpleCrit has a XML document model element * that is not mapped to data in a mapping class */ public static Criteria convertCriteria(Criteria simpleCrit, MappingDocument rootNode, QueryMetadataInterface metadata) throws QueryPlannerException, TeiidComponentException{ return convertObject((Criteria)simpleCrit.clone(), rootNode, metadata, true); }
/** * Deep copy of object * @return Deep copy of object */ public Object clone() { return new NotCriteria( (Criteria) getCriteria().clone() ); }
/** * Deep copy of object * @return Deep copy of object */ public Object clone() { return new NotCriteria( (Criteria) getCriteria().clone() ); }
/** * Deep copy of object * @return Deep copy of object */ public Object clone() { return new NotCriteria( (Criteria) getCriteria().clone() ); }
/** * Deep clone statement to produce a new identical statement. * @return Deep clone */ public Object clone() { Block otherBlock = this.whileBlock.clone(); Criteria otherCrit = (Criteria) this.condition.clone(); WhileStatement ws = new WhileStatement(otherCrit, otherBlock); ws.setLabel(label); return ws; }
/** * Deep clone statement to produce a new identical statement. * @return Deep clone */ public Object clone() { Block otherBlock = this.whileBlock.clone(); Criteria otherCrit = (Criteria) this.condition.clone(); WhileStatement ws = new WhileStatement(otherCrit, otherBlock); ws.setLabel(label); return ws; }
/** * @see org.teiid.query.processor.relational.PlanExecutionNode#clone() */ public Object clone() { DependentProcedureExecutionNode copy = new DependentProcedureExecutionNode(getID(), (Criteria)inputCriteria.clone(), inputReferences, inputDefaults); copyTo(copy); return copy; }
/** * @see org.teiid.query.processor.relational.PlanExecutionNode#clone() */ public Object clone() { DependentProcedureExecutionNode copy = new DependentProcedureExecutionNode(getID(), (Criteria)inputCriteria.clone(), inputReferences, inputDefaults); copyTo(copy); return copy; }
/** * @see org.teiid.query.processor.relational.PlanExecutionNode#clone() */ public Object clone() { DependentProcedureExecutionNode copy = new DependentProcedureExecutionNode(getID(), (Criteria)inputCriteria.clone(), inputReferences, inputDefaults); copyTo(copy); return copy; }
/** * Deep clone statement to produce a new identical statement. * @return Deep clone */ public Object clone() { Block otherBlock = this.whileBlock.clone(); Criteria otherCrit = (Criteria) this.condition.clone(); WhileStatement ws = new WhileStatement(otherCrit, otherBlock); ws.setLabel(label); return ws; }
@Override public void open() throws TeiidComponentException, TeiidProcessingException { if (shouldEvaluate) { preEvalCriteria = QueryRewriter.evaluateAndRewrite((Criteria)criteria.clone(), getEvaluator(elementMap), getContext(), this.getContext().getMetadata()); if (preEvalCriteria.equals(QueryRewriter.FALSE_CRITERIA) || preEvalCriteria.equals(QueryRewriter.UNKNOWN_CRITERIA)) { noRows = true; return; } } super.open(); }
@Override public void open() throws TeiidComponentException, TeiidProcessingException { if (shouldEvaluate) { preEvalCriteria = QueryRewriter.evaluateAndRewrite((Criteria)criteria.clone(), getEvaluator(elementMap), getContext(), this.getContext().getMetadata()); if (preEvalCriteria.equals(QueryRewriter.FALSE_CRITERIA) || preEvalCriteria.equals(QueryRewriter.UNKNOWN_CRITERIA)) { noRows = true; return; } } super.open(); }
/** * Deep clone statement to produce a new identical statement. * @return Deep clone */ public Object clone() { Block otherIf = this.ifBlock.clone(); Criteria otherCrit = (Criteria) this.condition.clone(); Block otherElse = null; if(this.hasElseBlock()) { otherElse = this.elseBlock.clone(); } return new IfStatement(otherCrit, otherIf, otherElse); }
/** * Deep clone statement to produce a new identical statement. * @return Deep clone */ public Object clone() { Block otherIf = this.ifBlock.clone(); Criteria otherCrit = (Criteria) this.condition.clone(); Block otherElse = null; if(this.hasElseBlock()) { otherElse = this.elseBlock.clone(); } return new IfStatement(otherCrit, otherIf, otherElse); }
/** * @see org.teiid.query.processor.relational.AccessNode#prepareNextCommand(org.teiid.query.sql.lang.Command) */ protected boolean prepareNextCommand(Command atomicCommand) throws TeiidComponentException, TeiidProcessingException { if (this.criteriaProcessor == null) { this.criteriaProcessor = new DependentProcedureCriteriaProcessor(this, (Criteria)inputCriteria.clone(), inputReferences, inputDefaults); } if (criteriaProcessor.prepareNextCommand(this.getContext().getVariableContext())) { return super.prepareNextCommand(atomicCommand); } return false; }
/** * @see org.teiid.query.processor.relational.AccessNode#prepareNextCommand(org.teiid.query.sql.lang.Command) */ protected boolean prepareNextCommand(Command atomicCommand) throws TeiidComponentException, TeiidProcessingException { if (this.criteriaProcessor == null) { this.criteriaProcessor = new DependentProcedureCriteriaProcessor(this, (Criteria)inputCriteria.clone(), inputReferences, inputDefaults); } if (criteriaProcessor.prepareNextCommand(this.getContext().getVariableContext())) { return super.prepareNextCommand(atomicCommand); } return false; }
/** * @see org.teiid.query.processor.relational.PlanExecutionNode#prepareNextCommand() */ protected boolean prepareNextCommand() throws BlockedException, TeiidComponentException, TeiidProcessingException { if (this.criteriaProcessor == null) { this.criteriaProcessor = new DependentProcedureCriteriaProcessor(this, (Criteria)inputCriteria.clone(), inputReferences, inputDefaults); } return criteriaProcessor.prepareNextCommand(this.getProcessorPlan().getContext().getVariableContext()); }
/** * @see org.teiid.query.processor.relational.AccessNode#prepareNextCommand(org.teiid.query.sql.lang.Command) */ protected boolean prepareNextCommand(Command atomicCommand) throws TeiidComponentException, TeiidProcessingException { if (this.criteriaProcessor == null) { this.criteriaProcessor = new DependentProcedureCriteriaProcessor(this, (Criteria)inputCriteria.clone(), inputReferences, inputDefaults); } if (criteriaProcessor.prepareNextCommand(this.getContext().getVariableContext())) { return super.prepareNextCommand(atomicCommand); } return false; }
/** * @see org.teiid.query.processor.relational.PlanExecutionNode#prepareNextCommand() */ protected boolean prepareNextCommand() throws BlockedException, TeiidComponentException, TeiidProcessingException { if (this.criteriaProcessor == null) { Criteria crit = (Criteria)inputCriteria.clone(); crit = QueryRewriter.evaluateAndRewrite(crit, getEvaluator(Collections.emptyMap()), this.getContext(), this.getContext().getMetadata()); this.criteriaProcessor = new DependentProcedureCriteriaProcessor(this, crit, inputReferences, inputDefaults); } return criteriaProcessor.prepareNextCommand(this.getProcessorPlan().getContext().getVariableContext()); }
/** * @see org.teiid.query.processor.relational.PlanExecutionNode#prepareNextCommand() */ protected boolean prepareNextCommand() throws BlockedException, TeiidComponentException, TeiidProcessingException { if (this.criteriaProcessor == null) { Criteria crit = (Criteria)inputCriteria.clone(); crit = QueryRewriter.evaluateAndRewrite(crit, getEvaluator(Collections.emptyMap()), this.getContext(), this.getContext().getMetadata()); this.criteriaProcessor = new DependentProcedureCriteriaProcessor(this, crit, inputReferences, inputDefaults); } return criteriaProcessor.prepareNextCommand(this.getProcessorPlan().getContext().getVariableContext()); }