class JDBCConnection implements ObjectStoreConnection {

    int getHostId(String hostName) {
        
        final String caller = "getHostId";

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

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

    public  JDBCConnection(Connection con, boolean autoCommit);

}