@Test public void testCreate() throws Exception { IDataSet db = database( support.loadFlatXmlDataStream(getClass(), "user.xml"), emptyBatchSet(schema) ); final IDatabaseConnection dbcon = support.getConnection(tx); support.cleanInsert(dbcon, db); support.initSequences(tx, 1, schema.tableBatch.id.getSequenceName()); tx.commit(); Batch batch = dao.create(); batch.setCreate(Timestamp.valueOf("2013-01-17 12:12:12.000")); batch.setDevice("device:scanner"); batch.setEstimateItemNumber(2); batch.setFolder("folder/"); batch.setGenerateIndices(true); batch.setLog("log"); batch.setParentPid("uuid:0eaa6730-9068-11dd-97de-000d606f5dc6"); batch.setState(State.LOADING); batch.setTitle("title_folder/"); batch.setUserId(1); batch.setProfileId(ConfigurationProfile.DEFAULT); dao.update(batch); tx.commit(); ReplacementTable expected = new ReplacementTable( support.loadFlatXmlDataStream(getClass(), "batch_single_item.xml") .getTable(schema.tableBatch.getName())); expected.addReplacementObject("{$now}", batch.getTimestamp()); Assertion.assertEquals(expected, dbcon.createTable(schema.tableBatch.getName())); }
@Override public Batch create() { return new Batch(); }
EmpireBatchDao extends EmpireDao implements BatchDao { @Override public Batch create() { return new Batch(); } }
EmpireBatchDao extends EmpireDao implements BatchDao { @Override public Batch create() { return new Batch(); } EmpireBatchDao(ProarcDatabase db); }
EmpireBatchDao extends EmpireDao implements BatchDao { @Override public Batch create() { return new Batch(); } EmpireBatchDao(ProarcDatabase db); @Override Batch create(); @Override void update(Batch batch); @Override Batch find(int batchId); @Override Batch findForPid(String pid); @Override List<Batch> findLoadingBatches(); @Override List<BatchView> view(Integer userId, Integer batchId, State state, int offset); @Override List<BatchView> view(Integer userId, Integer batchId, Set<State> state,
            Timestamp from, Timestamp to, int offset, int maxCount, String sortBy); @Override List<BatchView> view(BatchViewFilter filter); }
EmpireBatchDao extends EmpireDao implements BatchDao { @Override public Batch create() { return new Batch(); } EmpireBatchDao(ProarcDatabase db); @Override Batch create(); @Override void update(Batch batch); @Override Batch find(int batchId); @Override Batch findForPid(String pid); @Override List<Batch> findLoadingBatches(); @Override List<BatchView> view(Integer userId, Integer batchId, State state, int offset); @Override List<BatchView> view(Integer userId, Integer batchId, Set<State> state,
            Timestamp from, Timestamp to, int offset, int maxCount, String sortBy); @Override List<BatchView> view(BatchViewFilter filter);  }