class JDBCConnection implements ObjectStoreConnection {

    int getGroupId(int domainId, final String groupName) {

        final String caller = "getGroupId";

        // first check to see if our cache contains this value
        // otherwise we'll contact the MySQL Server

        final String cacheKey = CACHE_GROUP + domainId + '.' + groupName;

        Integer value = objectMap.get(cacheKey);
        if (value != null) {
            return value;
        }

        int groupId = 0;
        try (PreparedStatement ps = con.prepareStatement(SQL_GET_GROUP_ID)) {
            ps.setInt(1, domainId);
            ps.setString(2, groupName);
            try (ResultSet rs = executeQuery(ps, caller)) {
                if (rs.next()) {
                    groupId = rs.getInt(1);
                }
            }
        } catch (SQLException ex) {
            LOG.error("unable to get role id for name: " + groupName +
                    " error code: " + ex.getErrorCode() + " msg: " + ex.getMessage());
        }

        // before returning the value update our cache

        if (groupId != 0) {
            objectMap.put(cacheKey, groupId);
        }

        return groupId;
    }

    public  JDBCConnection(Connection con, boolean autoCommit);

}