public void saveJob(Job job) { try { session.save(job); if (job instanceof Timer) { Timer timer = (Timer) job; Action action = timer.getAction(); // if action is transient, save it if (action != null && action.getId() == 0L) session.save(action); } } catch (HibernateException e) { throw new JbpmPersistenceException("could not save " + job, e); } }
public void saveJob(Job job) { try { session.save(job); if (job instanceof Timer) { Timer timer = (Timer) job; Action action = timer.getAction(); // if action is transient, save it if (action != null && action.getId() == 0L) session.save(action); } } catch (HibernateException e) { throw new JbpmPersistenceException("could not save " + job, e); } }
public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Action)) return false; Action other = (Action) o; if (id != 0 && id == other.getId()) return true; if (name != null) { // named actions are unique at the process definition level return name.equals(other.getName()) && processDefinition.equals(other.getProcessDefinition()); } return (actionDelegation != null ? actionDelegation.equals(other.getActionDelegation()) : actionExpression != null ? actionExpression.equals(other.getActionExpression()) : referencedAction != null ? referencedAction.equals(other.getActionExpression()) : false) && event.equals(other.getEvent()); }
public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Action)) return false; Action other = (Action) o; if (id != 0 && id == other.getId()) return true; if (name != null) { // named actions are unique at the process definition level return name.equals(other.getName()) && processDefinition.equals(other.getProcessDefinition()); } return (actionDelegation != null ? actionDelegation.equals(other.getActionDelegation()) : actionExpression != null ? actionExpression.equals(other.getActionExpression()) : referencedAction != null ? referencedAction.equals(other.getReferencedAction()) : false) && event.equals(other.getEvent()); }