class JDBCConnection implements ObjectStoreConnection {

    int getPolicyId(int domainId, String policyName) {
        
        final String caller = "getPolicyId";

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

        final String cacheKey = CACHE_POLICY + domainId + '.' + policyName;
        
        Integer value = objectMap.get(cacheKey);
        if (value != null) {
            return value;
        }
        
        int policyId = 0;
        try (PreparedStatement ps = con.prepareStatement(SQL_GET_POLICY_ID)) {
            ps.setInt(1, domainId);
            ps.setString(2, policyName);
            try (ResultSet rs = executeQuery(ps, caller)) {
                if (rs.next()) {
                    policyId = rs.getInt(1);
                }
            }
        } catch (SQLException ex) {
            LOG.error("unable to get polcy id for name: " + policyName +
                    " error code: " + ex.getErrorCode() + " msg: " + ex.getMessage());
        }
        
        // before returning the value update our cache
        
        if (policyId != 0) {
            objectMap.put(cacheKey, policyId);
        }
        
        return policyId;
    }

    public  JDBCConnection(Connection con, boolean autoCommit);

}