class JDBCConnection implements ObjectStoreConnection {

    @Override
    public int countGroupMembers(String domainName, String groupName) {
        final String caller = "countGroupMembers";

        int domainId = getDomainId(domainName);
        if (domainId == 0) {
            throw notFoundError(caller, ZMSConsts.OBJECT_DOMAIN, domainName);
        }
        int groupId = getGroupId(domainId, groupName);
        if (groupId == 0) {
            throw notFoundError(caller, ZMSConsts.OBJECT_GROUP, ZMSUtils.groupResourceName(domainName, groupName));
        }
        int count = 0;
        try (PreparedStatement ps = con.prepareStatement(SQL_COUNT_GROUP_MEMBERS)) {
            ps.setInt(1, groupId);
            try (ResultSet rs = executeQuery(ps, caller)) {
                if (rs.next()) {
                    count = rs.getInt(1);
                }
            }
        } catch (SQLException ex) {
            throw sqlError(ex, caller);
        }
        return count;
    }

    public  JDBCConnection(Connection con, boolean autoCommit);

}