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