public Broker getBroker() { try { return _query.getBroker(); } catch (RuntimeException re) { throw translate(re); } }
public Broker getBroker() { try { return _query.getBroker(); } catch (RuntimeException re) { throw translate(re); } }
public Broker getBroker() { try { return _query.getBroker(); } catch (RuntimeException re) { throw translate(re); } }
public Broker getBroker() { try { return _query.getBroker(); } catch (RuntimeException re) { throw translate(re); } }
public Broker getBroker() { try { return _query.getBroker(); } catch (RuntimeException re) { throw translate(re); } }
/** * Record a key-value pair only only if the given key is supported. * * @return FALSE if the key is unrecognized. * null (i.e. MAY BE) if the key is recognized, but not supported. * TRUE if the key is supported. */ protected Boolean record(String hint, Object value) { if (hint == null) return Boolean.FALSE; if (_supportedHints.contains(hint)) { if (_hints == null) _hints = new TreeMap<String, Object>(); _hints.put(hint, value); return Boolean.TRUE; } if (isKnownPrefix(hint)) { Log log = owner.getDelegate().getBroker().getConfiguration().getLog(OpenJPAConfiguration.LOG_RUNTIME); String possible = StringDistance.getClosestLevenshteinDistance(hint, getSupportedHints()); if (log.isWarnEnabled()) log.warn(_loc.get("bad-query-hint", hint, possible)); return null; // possible but not registered } return Boolean.FALSE; // not possible }
/** * Record a key-value pair only only if the given key is supported. * * @return FALSE if the key is unrecognized. * null (i.e. MAY BE) if the key is recognized, but not supported. * TRUE if the key is supported. */ protected Boolean record(String hint, Object value) { if (hint == null) return Boolean.FALSE; if (_supportedHints.contains(hint)) { if (_hints == null) _hints = new TreeMap<String, Object>(); _hints.put(hint, value); return Boolean.TRUE; } if (isKnownPrefix(hint)) { Log log = owner.getDelegate().getBroker().getConfiguration().getLog(OpenJPAConfiguration.LOG_RUNTIME); String possible = StringDistance.getClosestLevenshteinDistance(hint, getSupportedHints()); if (log.isWarnEnabled()) log.warn(_loc.get("bad-query-hint", hint, possible)); return null; // possible but not registered } return Boolean.FALSE; // not possible }
/** * Record a key-value pair only only if the given key is supported. * * @return FALSE if the key is unrecognized. * null (i.e. MAY BE) if the key is recognized, but not supported. * TRUE if the key is supported. */ protected Boolean record(String hint, Object value) { if (hint == null) return Boolean.FALSE; if (_supportedHints.contains(hint)) { if (_hints == null) _hints = new TreeMap<String, Object>(); _hints.put(hint, value); return Boolean.TRUE; } if (isKnownPrefix(hint)) { Log log = owner.getDelegate().getBroker().getConfiguration().getLog(OpenJPAConfiguration.LOG_RUNTIME); String possible = StringDistance.getClosestLevenshteinDistance(hint, getSupportedHints()); if (log.isWarnEnabled()) log.warn(_loc.get("bad-query-hint", hint, possible)); return null; // possible but not registered } return Boolean.FALSE; // not possible }
/** * Record a key-value pair only only if the given key is supported. * * @return FALSE if the key is unrecognized. * null (i.e. MAY BE) if the key is recognized, but not supported. * TRUE if the key is supported. */ protected Boolean record(String hint, Object value) { if (hint == null) return Boolean.FALSE; if (_supportedHints.contains(hint)) { if (_hints == null) _hints = new TreeMap<String, Object>(); _hints.put(hint, value); return Boolean.TRUE; } if (isKnownPrefix(hint)) { Log log = owner.getDelegate().getBroker().getConfiguration().getLog(OpenJPAConfiguration.LOG_RUNTIME); String possible = StringDistance.getClosestLevenshteinDistance(hint, getSupportedHints()); if (log.isWarnEnabled()) log.warn(_loc.get("bad-query-hint", hint, possible)); return null; // possible but not registered } return Boolean.FALSE; // not possible }
ClassLoader loader = owner.getDelegate().getBroker().getClassLoader(); if (QueryHints.HINT_SUBCLASSES.equals(key)) { if (value instanceof String)
ClassLoader loader = owner.getDelegate().getBroker().getClassLoader(); if (QueryHints.HINT_SUBCLASSES.equals(key)) { if (value instanceof String)
ClassLoader loader = owner.getDelegate().getBroker().getClassLoader(); if (QueryHints.HINT_SUBCLASSES.equals(key)) { if (value instanceof String)
ClassLoader loader = owner.getDelegate().getBroker().getClassLoader(); if (QueryHints.HINT_SUBCLASSES.equals(key)) { if (value instanceof String)