@Test public void testInsert() { final ZoneOperationLogModel log1 = newZoneOperationLogModel(); final ZoneOperationLogModel log2 = newZoneOperationLogModel(); log1.setComplete(true); log2.setComplete(true); final List<ZoneOperationLogModel> logs = Lists.newArrayList(log1, log2); zoneOperationLogDao.insert(log1, log2); for (final ZoneOperationLogModel log : logs) { final List<ZoneOperationLog> logModels = query(log); Assert.assertEquals(1, logModels.size()); assertZoneOperationLog(log, logModels.get(0)); } log1.setComplete(false); log2.setComplete(false); zoneOperationLogDao.insert(log1, log2); for (final ZoneOperationLogModel log : logs) { final List<ZoneOperationLog> logModels = query(log); Assert.assertEquals(1, logModels.size()); assertZoneOperationLog(log, logModels.get(0)); } }
public void insert(final ZoneOperationLogModel... logs) { if ((logs == null) || (logs.length == 0)) { return; } this.insert(Lists.newArrayList(logs)); }
ZoneOperationLogDao { public void insert(final ZoneOperationLogModel... logs) { if ((logs == null) || (logs.length == 0)) { return; } this.insert(Lists.newArrayList(logs)); } }
ZoneOperationLogDao { public void insert(final ZoneOperationLogModel... logs) { if ((logs == null) || (logs.length == 0)) { return; } this.insert(Lists.newArrayList(logs)); } private  ZoneOperationLogDao(); }
ZoneOperationLogDao { public void insert(final ZoneOperationLogModel... logs) { if ((logs == null) || (logs.length == 0)) { return; } this.insert(Lists.newArrayList(logs)); } private  ZoneOperationLogDao(); List<ZoneOperationLog> select(ZoneOperationLogModel filter, Boolean complete); List<ZoneOperationLog> query(final String condition, final List<String> args); void insert(final ZoneOperationLogModel... logs); void insert(final List<ZoneOperationLogModel> logs); }
ZoneOperationLogDao { public void insert(final ZoneOperationLogModel... logs) { if ((logs == null) || (logs.length == 0)) { return; } this.insert(Lists.newArrayList(logs)); } private  ZoneOperationLogDao(); List<ZoneOperationLog> select(ZoneOperationLogModel filter, Boolean complete); List<ZoneOperationLog> query(final String condition, final List<String> args); void insert(final ZoneOperationLogModel... logs); void insert(final List<ZoneOperationLogModel> logs); static final ZoneOperationLogDao INSTANCE; }