@Test public void testInsert() { final GroupTagLogModel log1 = newModel(); final GroupTagLogModel log2 = newModel(); final List<GroupTagLogModel> logs = Lists.newArrayList(log1, log2); groupTagLogDao.insert(log1, log2); for (final GroupTagLogModel log : logs) { final List<GroupTagLog> ls = query(log); Assert.assertTrue(ls.size() == 1); assertLog(log, ls.get(0)); } Assert.assertTrue(groupTagLogDao.query("create_time >= DATE_SUB(now(), INTERVAL ? MINUTE)", "2").size() >= logs.size()); Assert.assertTrue(groupTagLogDao.query("create_time > now()").size() == 0); Assert.assertTrue(groupTagLogDao.query("create_time <= now()").size() >= logs.size()); }
public void insert(final GroupTagLogModel... logs) { if ((logs == null) || (logs.length == 0)) { return; } this.insert(Lists.newArrayList(logs)); }
GroupTagLogDao { public void insert(final GroupTagLogModel... logs) { if ((logs == null) || (logs.length == 0)) { return; } this.insert(Lists.newArrayList(logs)); } }
GroupTagLogDao { public void insert(final GroupTagLogModel... logs) { if ((logs == null) || (logs.length == 0)) { return; } this.insert(Lists.newArrayList(logs)); } private  GroupTagLogDao(); }
GroupTagLogDao { public void insert(final GroupTagLogModel... logs) { if ((logs == null) || (logs.length == 0)) { return; } this.insert(Lists.newArrayList(logs)); } private  GroupTagLogDao(); List<GroupTagLog> query(final String condition, final Object... args); void insert(final GroupTagLogModel... logs); void insert(final List<GroupTagLogModel> logs); }
GroupTagLogDao { public void insert(final GroupTagLogModel... logs) { if ((logs == null) || (logs.length == 0)) { return; } this.insert(Lists.newArrayList(logs)); } private  GroupTagLogDao(); List<GroupTagLog> query(final String condition, final Object... args); void insert(final GroupTagLogModel... logs); void insert(final List<GroupTagLogModel> logs); static final GroupTagLogDao INSTANCE; }