@Test public void testRemove() throws Exception { IDataSet db = database( support.loadFlatXmlDataStream(getClass(), "user.xml"), support.loadFlatXmlDataStream(getClass(), "wf_job.xml"), support.loadFlatXmlDataStream(getClass(), "wf_task.xml"), support.loadFlatXmlDataStream(getClass(), "wf_param.xml") ); support.cleanInsert(support.getConnection(tx), db); tx.commit(); Task task = new Task().addId(BigDecimal.ONE); List<TaskParameter> params = dao.find(task.getId()); assertEquals(2, params.size()); dao.remove(task.getId()); tx.commit(); params = dao.find(task.getId()); assertEquals(0, params.size()); }
@Override public void remove(BigDecimal taskId) { if (taskId == null) { throw new IllegalArgumentException("Unsupported missing taskId!"); } Connection c = getConnection(); DBCommand cmd = db.createCommand(); cmd.where(tableParams.taskId.is(taskId)); db.executeDelete(tableParams, cmd, c); }
EmpireWorkflowParameterDao extends EmpireDao implements WorkflowParameterDao { @Override public void remove(BigDecimal taskId) { if (taskId == null) { throw new IllegalArgumentException("Unsupported missing taskId!"); } Connection c = getConnection(); DBCommand cmd = db.createCommand(); cmd.where(tableParams.taskId.is(taskId)); db.executeDelete(tableParams, cmd, c); } }
EmpireWorkflowParameterDao extends EmpireDao implements WorkflowParameterDao { @Override public void remove(BigDecimal taskId) { if (taskId == null) { throw new IllegalArgumentException("Unsupported missing taskId!"); } Connection c = getConnection(); DBCommand cmd = db.createCommand(); cmd.where(tableParams.taskId.is(taskId)); db.executeDelete(tableParams, cmd, c); } EmpireWorkflowParameterDao(ProarcDatabase db); }
EmpireWorkflowParameterDao extends EmpireDao implements WorkflowParameterDao { @Override public void remove(BigDecimal taskId) { if (taskId == null) { throw new IllegalArgumentException("Unsupported missing taskId!"); } Connection c = getConnection(); DBCommand cmd = db.createCommand(); cmd.where(tableParams.taskId.is(taskId)); db.executeDelete(tableParams, cmd, c); } EmpireWorkflowParameterDao(ProarcDatabase db); @Override TaskParameter create(); @Override void add(BigDecimal taskId, List<TaskParameter> params); @Override void remove(BigDecimal taskId); @Override List<TaskParameter> find(BigDecimal taskId); Map<String, String> findAsMap(BigDecimal taskId); @Override List<TaskParameterView> view(TaskParameterFilter filter); }
EmpireWorkflowParameterDao extends EmpireDao implements WorkflowParameterDao { @Override public void remove(BigDecimal taskId) { if (taskId == null) { throw new IllegalArgumentException("Unsupported missing taskId!"); } Connection c = getConnection(); DBCommand cmd = db.createCommand(); cmd.where(tableParams.taskId.is(taskId)); db.executeDelete(tableParams, cmd, c); } EmpireWorkflowParameterDao(ProarcDatabase db); @Override TaskParameter create(); @Override void add(BigDecimal taskId, List<TaskParameter> params); @Override void remove(BigDecimal taskId); @Override List<TaskParameter> find(BigDecimal taskId); Map<String, String> findAsMap(BigDecimal taskId); @Override List<TaskParameterView> view(TaskParameterFilter filter);  }