/** * Adds <code>o</code> to <code>map</code> under key for <code>val</code>. * Use this method instead of attempting to add the value directly because * this will account for the property prefix. */ private void put(Map map, Value val, Object o) { Object key = val.getLoadKey(); if (key == null) key = "openjpa." + val.getProperty(); map.put(key, o); }
/** * Adds <code>o</code> to <code>map</code> under key for <code>val</code>. * Use this method instead of attempting to add the value directly because * this will account for the property prefix. */ private void setValue(Map map, Value val) { Object key = val.getLoadKey(); if (key == null) { List<String> keys = val.getPropertyKeys(); for (String k : keys) { if (hasKnownPrefix(k)) { key = k; break; } } if (key == null) { key = "openjpa." + val.getProperty(); } } Object external = val.isHidden() ? Value.INVISIBLE : val instanceof ObjectValue ? val.getString() : val.get(); map.put(key, external); }
/** * Adds <code>o</code> to <code>map</code> under key for <code>val</code>. * Use this method instead of attempting to add the value directly because * this will account for the property prefix. */ private void setValue(Map map, Value val) { Object key = val.getLoadKey(); if (key == null) { List<String> keys = val.getPropertyKeys(); for (String k : keys) { if (hasKnownPrefix(k)) { key = k; break; } } if (key == null) { key = "openjpa." + val.getProperty(); } } Object external = val.isHidden() ? Value.INVISIBLE : val instanceof ObjectValue ? val.getString() : val.get(); map.put(key, external); }
/** * Adds <code>o</code> to <code>map</code> under key for <code>val</code>. * Use this method instead of attempting to add the value directly because * this will account for the property prefix. */ private void setValue(Map map, Value val) { Object key = val.getLoadKey(); if (key == null) { List<String> keys = val.getPropertyKeys(); for (String k : keys) { if (hasKnownPrefix(k)) { key = k; break; } } if (key == null) { key = "openjpa." + val.getProperty(); } } Object external = val.isHidden() ? Value.INVISIBLE : val instanceof ObjectValue ? val.getString() : val.get(); map.put(key, external); }