public String getXML() { StringBuffer retval = new StringBuffer(200); if ((null != from_entry) && (null != to_entry)) { retval.append(" <hop>").append(Const.CR); retval.append(" ").append(XMLHandler.addTagValue("from", from_entry.getName())); retval.append(" ").append(XMLHandler.addTagValue("to", to_entry.getName())); retval.append(" ").append(XMLHandler.addTagValue("from_nr", from_entry.getNr())); retval.append(" ").append(XMLHandler.addTagValue("to_nr", to_entry.getNr())); retval.append(" ").append(XMLHandler.addTagValue("enabled", enabled)); retval.append(" ").append(XMLHandler.addTagValue("evaluation", evaluation)); retval.append(" ").append(XMLHandler.addTagValue("unconditional", unconditional)); retval.append(" ").append(XMLHandler.addTagValue("gui_mid_location_x", guiMidLocationX)); retval.append(" ").append(XMLHandler.addTagValue("gui_mid_location_y", guiMidLocationY)); retval.append(" </hop>").append(Const.CR); } return retval.toString(); }
public JobHopMeta(JobEntryCopy from, JobEntryCopy to) { from_entry = from; to_entry = to; enabled = true; split = false; evaluation = true; unconditional = false; id = -1L; guiMidLocationX = ""; guiMidLocationY = ""; if (from.isStart()) setUnconditional(); }
public void saveRep(Repository rep, long id_job) throws KettleException { try { long id_jobentry_from = -1, id_jobentry_to = -1; id_jobentry_from = from_entry == null ? -1 : from_entry.getID(); id_jobentry_to = to_entry == null ? -1 : to_entry.getID(); // Insert new transMeta hop in repository setID( rep.insertJobHop( id_job, id_jobentry_from, id_jobentry_to, enabled, evaluation, unconditional, guiMidLocationX, guiMidLocationY)); } catch (KettleDatabaseException dbe) { throw new KettleException( Messages.getString("JobHopMeta.Exception.UnableToSaveHopInfoRep", "" + id_job), dbe); } }
private JobEntryCopy searchJobEntry(List<JobEntryCopy> entries, String name) { for (JobEntryCopy jobEntry : entries) if (jobEntry.getName().equalsIgnoreCase(name)) return jobEntry; return null; }