OperationLogIbatisDao extends SqlMapClientDaoSupport implements OperationLogDao { @Override public long getLogCount(OperationLogCriteria logCriteria, Paginater<OperationLog> paginater) { Long logCount = (Long) getSqlMapClientTemplate().queryForObject("OperationLog.getOpLogCount", Maps.entry("criteria", logCriteria) .entry("paginater", paginater).get()); return logCount != null ? logCount : 0L; }  @Override long getLogCount(OperationLogCriteria logCriteria, Paginater<OperationLog> paginater); @SuppressWarnings("unchecked") @Override List<OperationLog> getLogList(OperationLogCriteria logCriteria, Paginater<OperationLog> paginater); @Override int insertOpLog(OperationLog oplog); @Override String getLogKey(int logId, String key);  }
@Test public void testGetLogCount() throws Exception { OperationLogCriteria criteria = new OperationLogCriteria(); criteria.setProjectId(Project_Foo_Id); criteria.setEnvId(Env1_Id); String opType = OperationTypeEnum.Config_All.getBegin() + "|" + OperationTypeEnum.Config_All.getEnd() + "|" + OperationTypeEnum.Config_All.isProjectRelated(); criteria.setOpType(opType); Paginater<OperationLog> paginater = new Paginater<OperationLog>(); long logCount = operationLogDao.getLogCount(criteria, paginater); assertEquals(2, logCount); }