/** * Returns a deep clone */ public BlockInstruction clone(){ return new BlockInstruction(this.program.clone()); }
/** * Returns a deep clone */ public WhileInstruction clone(){ return new WhileInstruction(this.whileProgram.clone(), this.condition, this.label); }
public ProcessorPlan clone(){ ProcedurePlan plan = new ProcedurePlan(originalProgram.clone()); plan.setOutputElements(this.getOutputElements()); plan.setParams(params); plan.setOutParams(outParams); plan.setMetadata(metadata); plan.updateCount = updateCount; plan.runInContext = runInContext; return plan; }
public void incrementProgramCounter() throws TeiidComponentException { if (this.programs.isEmpty()) { return; } Program program = peek(); ProgramInstruction instr = program.getCurrentInstruction(); if (instr instanceof RepeatedInstruction) { RepeatedInstruction repeated = (RepeatedInstruction)instr; repeated.postInstruction(this); } peek().incrementProgramCounter(); }
/** * @see org.teiid.query.processor.proc.ProgramInstruction#clone() */ public AssignmentInstruction clone() { AssignmentInstruction clone = new AssignmentInstruction(); clone.setVariable(this.variable); clone.setExpression(this.expression); return clone; }
/** * Returns a deep clone */ public IfInstruction clone(){ Program cloneIf = this.ifProgram.clone(); Program cloneElse = null; if(elseProgram != null) { cloneElse = this.elseProgram.clone(); } IfInstruction clone = new IfInstruction(this.condition, cloneIf, cloneElse); return clone; }
@Override public Boolean requiresTransaction(boolean transactionalReads) { Boolean requires = super.requiresTransaction(transactionalReads); if (requires != null && requires) { return true; } Boolean loopRequires = loopProgram.requiresTransaction(transactionalReads); if (loopRequires == null || loopRequires) { return true; } return requires; }
/** * Returns the next instruction to be executed, or null if there are * none or no more instructions. * @return ProgramInstruction to be executed next, or null if there * are no more to execute (or if this Program is empty) */ public ProgramInstruction getCurrentInstruction(){ return getInstructionAtIndex(counter); }
@Override public void initialize(CommandContext context, ProcessorDataManager dataMgr, BufferManager bufferMgr) { setContext(context); this.dataMgr = dataMgr; this.bufferMgr = bufferMgr; }
public ProcessorPlan clone(){ ProcedurePlan plan = new ProcedurePlan(originalProgram.clone()); plan.setOutputElements(this.getOutputElements()); plan.setParams(params); plan.setOutParams(outParams); plan.setMetadata(metadata); plan.updateCount = updateCount; plan.runInContext = runInContext; return plan; }
public void incrementProgramCounter() throws TeiidComponentException { if (this.programs.isEmpty()) { return; } Program program = peek(); ProgramInstruction instr = program.getCurrentInstruction(); if (instr instanceof RepeatedInstruction) { RepeatedInstruction repeated = (RepeatedInstruction)instr; repeated.postInstruction(this); } peek().incrementProgramCounter(); }
/** * Returns a deep clone */ public BlockInstruction clone(){ return new BlockInstruction(this.program.clone()); }
/** * Returns a deep clone */ public WhileInstruction clone(){ return new WhileInstruction(this.whileProgram.clone(), this.condition, this.label); }
/** * Returns a deep clone */ public IfInstruction clone(){ Program cloneIf = this.ifProgram.clone(); Program cloneElse = null; if(elseProgram != null) { cloneElse = this.elseProgram.clone(); } IfInstruction clone = new IfInstruction(this.condition, cloneIf, cloneElse); return clone; }
public ProcessorPlan clone(){ ProcedurePlan plan = new ProcedurePlan(originalProgram.clone()); plan.setOutputElements(this.getOutputElements()); plan.setParams(params); plan.setOutParams(outParams); plan.setMetadata(metadata); plan.updateCount = updateCount; plan.runInContext = runInContext; return plan; }
public void incrementProgramCounter() throws TeiidComponentException { if (this.programs.isEmpty()) { return; } Program program = peek(); ProgramInstruction instr = program.getCurrentInstruction(); if (instr instanceof RepeatedInstruction) { RepeatedInstruction repeated = (RepeatedInstruction)instr; repeated.postInstruction(this); } peek().incrementProgramCounter(); }
/** * Returns a deep clone */ public BlockInstruction clone(){ return new BlockInstruction(this.program.clone()); }
/** * Returns a deep clone */ public WhileInstruction clone(){ return new WhileInstruction(this.whileProgram.clone(), this.condition, this.label); }
/** * Returns a deep clone */ public IfInstruction clone(){ Program cloneIf = this.ifProgram.clone(); Program cloneElse = null; if(elseProgram != null) { cloneElse = this.elseProgram.clone(); } IfInstruction clone = new IfInstruction(this.condition, cloneIf, cloneElse); return clone; }