@Test void testGetNrOfObjectIdentities() { Map<String, Object> paramMap = new HashMap<>(); paramMap.put("classId", "classId"); doReturn(new Integer(12)) .when(jdbcTemplate) .queryForObject( "SELECT COUNT( DISTINCT acl_object_identity.object_id_identity) FROM acl_object_identity LEFT JOIN acl_class ON acl_object_identity.object_id_class = acl_class.id LEFT JOIN acl_entry ON acl_entry.acl_object_identity = acl_object_identity.id LEFT JOIN acl_sid ON acl_entry.sid = acl_sid.id WHERE acl_class.class = :classId", paramMap, Integer.class); assertEquals(12, objectIdentityService.getNrOfObjectIdentities("classId").intValue()); }
@Override public Integer getNrOfObjectIdentities(String classId) { Map<String, Object> paramMap = new HashMap<>(); paramMap.put(CLASS_ID, classId); return getTemplate() .queryForObject(SQL_COUNT_OBJECT_IDENTITIES + WHERE_CLASS, paramMap, Integer.class); }
ObjectIdentityServiceImpl implements ObjectIdentityService { @Override public Integer getNrOfObjectIdentities(String classId) { Map<String, Object> paramMap = new HashMap<>(); paramMap.put(CLASS_ID, classId); return getTemplate() .queryForObject(SQL_COUNT_OBJECT_IDENTITIES + WHERE_CLASS, paramMap, Integer.class); } }
ObjectIdentityServiceImpl implements ObjectIdentityService { @Override public Integer getNrOfObjectIdentities(String classId) { Map<String, Object> paramMap = new HashMap<>(); paramMap.put(CLASS_ID, classId); return getTemplate() .queryForObject(SQL_COUNT_OBJECT_IDENTITIES + WHERE_CLASS, paramMap, Integer.class); } ObjectIdentityServiceImpl(JdbcTemplate jdbcTemplate, EntityHelper entityHelper);   ObjectIdentityServiceImpl(NamedParameterJdbcTemplate jdbcTemplate, EntityHelper entityHelper); }
ObjectIdentityServiceImpl implements ObjectIdentityService { @Override public Integer getNrOfObjectIdentities(String classId) { Map<String, Object> paramMap = new HashMap<>(); paramMap.put(CLASS_ID, classId); return getTemplate() .queryForObject(SQL_COUNT_OBJECT_IDENTITIES + WHERE_CLASS, paramMap, Integer.class); } ObjectIdentityServiceImpl(JdbcTemplate jdbcTemplate, EntityHelper entityHelper);   ObjectIdentityServiceImpl(NamedParameterJdbcTemplate jdbcTemplate, EntityHelper entityHelper); @Override List<ObjectIdentity> getObjectIdentities(String classId); @Override Integer getNrOfObjectIdentities(String classId); @Override Integer getNrOfObjectIdentities(String classId, Set<Sid> sids); @Override List<ObjectIdentity> getObjectIdentities(String classId, int limit, int offset); @Override List<ObjectIdentity> getObjectIdentities(
      String classId, Set<Sid> sids, int limit, int offset); @Override List<ObjectIdentity> getObjectIdentities(String classId, Set<Sid> sids); }
ObjectIdentityServiceImpl implements ObjectIdentityService { @Override public Integer getNrOfObjectIdentities(String classId) { Map<String, Object> paramMap = new HashMap<>(); paramMap.put(CLASS_ID, classId); return getTemplate() .queryForObject(SQL_COUNT_OBJECT_IDENTITIES + WHERE_CLASS, paramMap, Integer.class); } ObjectIdentityServiceImpl(JdbcTemplate jdbcTemplate, EntityHelper entityHelper);   ObjectIdentityServiceImpl(NamedParameterJdbcTemplate jdbcTemplate, EntityHelper entityHelper); @Override List<ObjectIdentity> getObjectIdentities(String classId); @Override Integer getNrOfObjectIdentities(String classId); @Override Integer getNrOfObjectIdentities(String classId, Set<Sid> sids); @Override List<ObjectIdentity> getObjectIdentities(String classId, int limit, int offset); @Override List<ObjectIdentity> getObjectIdentities(
      String classId, Set<Sid> sids, int limit, int offset); @Override List<ObjectIdentity> getObjectIdentities(String classId, Set<Sid> sids); static final Integer MAX_RESULTS; static final String OBJECT_ID_IDENTITY; static final String CLASS; static final String CLASS_ID; static final String LIMIT; static final String OFFSET; static final String SIDS; }