本文整理了Java中org.apache.openjpa.lib.conf.Value.getPropertyKeys()
方法的一些代码示例,展示了Value.getPropertyKeys()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Value.getPropertyKeys()
方法的具体详情如下:
包路径:org.apache.openjpa.lib.conf.Value
类名称:Value
方法名:getPropertyKeys
[英]Gets unmodifiable view of all the property keys set on this receiver. The 0-th element in the returned list is always the same as the original key returned by #getProperty() method.
[中]获取此接收器上设置的所有属性键的不可修改视图。返回列表中的第0个元素始终与#getProperty()方法返回的原始键相同。
代码示例来源:origin: org.apache.openjpa/openjpa-lib
public List<String> getPropertyKeys(String propertyName) {
Value value = getValue(propertyName);
return value == null ? Collections.EMPTY_LIST : value.getPropertyKeys();
}
代码示例来源:origin: org.apache.openjpa/openjpa-all
public List<String> getPropertyKeys(String propertyName) {
Value value = getValue(propertyName);
return value == null ? Collections.EMPTY_LIST : value.getPropertyKeys();
}
代码示例来源:origin: org.apache.openejb.patch/openjpa
public List<String> getPropertyKeys(String propertyName) {
Value value = getValue(propertyName);
return value == null ? Collections.EMPTY_LIST : value.getPropertyKeys();
}
代码示例来源:origin: org.apache.openejb.patch/openjpa
/**
* Test whether the map contains the given partial key, prefixed with any
* possible configuration prefix.
*/
public static boolean containsProperty(Value value, Map props) {
if (value == null || props == null || props.isEmpty())
return false;
List<String> partialKeys = value.getPropertyKeys();
for (String partialKey : partialKeys) {
if (props.containsKey(
ProductDerivations.getConfigurationKey(partialKey, props)))
return true;
}
return false;
}
代码示例来源:origin: org.apache.openjpa/openjpa-lib
/**
* Test whether the map contains the given partial key, prefixed with any
* possible configuration prefix.
*/
public static boolean containsProperty(Value value, Map props) {
if (value == null || props == null || props.isEmpty())
return false;
List<String> partialKeys = value.getPropertyKeys();
for (String partialKey : partialKeys) {
if (props.containsKey(
ProductDerivations.getConfigurationKey(partialKey, props)))
return true;
}
return false;
}
代码示例来源:origin: org.apache.openjpa/openjpa-all
/**
* Test whether the map contains the given partial key, prefixed with any
* possible configuration prefix.
*/
public static boolean containsProperty(Value value, Map props) {
if (value == null || props == null || props.isEmpty())
return false;
List<String> partialKeys = value.getPropertyKeys();
for (String partialKey : partialKeys) {
if (props.containsKey(
ProductDerivations.getConfigurationKey(partialKey, props)))
return true;
}
return false;
}
代码示例来源:origin: org.apache.openejb.patch/openjpa
/**
* Look up the given value, testing all available prefixes and all possible
* property names. Detects if the given map contains multiple keys that
* are equivalent names for the given value.
*/
private Object findValue(Map map, Value val) {
Object result = null;
List<String> partialKeys = val.getPropertyKeys();
for (String partialKey : partialKeys) {
String key = ProductDerivations.getConfigurationKey(
partialKey, map);
if (map.containsKey(key)) {
// do not return immediately. Looping through all equivalent
// property names will detect if the Map contains multiple keys
// that are equivalent as it tries to set load key.
val.setLoadKey(key);
result = map.get(key);
}
}
return result;
}
代码示例来源:origin: org.apache.openjpa/openjpa-all
/**
* Look up the given value, testing all available prefixes and all possible
* property names. Detects if the given map contains multiple keys that
* are equivalent names for the given value.
*/
private Object findValue(Map map, Value val) {
Object result = null;
List<String> partialKeys = val.getPropertyKeys();
for (String partialKey : partialKeys) {
String key = ProductDerivations.getConfigurationKey(
partialKey, map);
if (map.containsKey(key)) {
// do not return immediately. Looping through all equivalent
// property names will detect if the Map contains multiple keys
// that are equivalent as it tries to set load key.
val.setLoadKey(key);
result = map.get(key);
}
}
return result;
}
代码示例来源:origin: org.apache.openejb.patch/openjpa
/**
* Gets all known property keys.
* The keys are harvested from the property names (including the equivalent names) of the registered values.
* A key may be prefixed if the corresponding property name was without a prefix.
* @see #fixPrefix(String)
* The Values that are {@linkplain Value#makePrivate() marked private} are filtered out.
*/
public Set<String> getPropertyKeys() {
synchronized (_supportedKeys) {
if (_supportedKeys.size() == 0) {
for (Value val : _vals) {
if (val.isPrivate())
continue;
List<String> keys = val.getPropertyKeys();
for (String key : keys) {
_supportedKeys.add(fixPrefix(key));
}
}
}
}
//OJ2257: Return a copy of _supportedKeys as calls to this method (e.g.
//BrokerImpl.getSupportedProperties()) may add to this set.
return new TreeSet<String>(_supportedKeys);
}
代码示例来源:origin: org.apache.openjpa/openjpa-lib
/**
* Look up the given value, testing all available prefixes and all possible
* property names. Detects if the given map contains multiple keys that
* are equivalent names for the given value.
*/
private Object findValue(Map map, Value val) {
Object result = null;
List<String> partialKeys = val.getPropertyKeys();
for (String partialKey : partialKeys) {
String key = ProductDerivations.getConfigurationKey(
partialKey, map);
if (map.containsKey(key)) {
// do not return immediately. Looping through all equivalent
// property names will detect if the Map contains multiple keys
// that are equivalent as it tries to set load key.
val.setLoadKey(key);
result = map.get(key);
}
}
return result;
}
代码示例来源:origin: org.apache.openjpa/openjpa-lib
/**
* Gets all known property keys.
* The keys are harvested from the property names (including the equivalent names) of the registered values.
* A key may be prefixed if the corresponding property name was without a prefix.
* @see #fixPrefix(String)
* The Values that are {@linkplain Value#makePrivate() marked private} are filtered out.
*/
public Set<String> getPropertyKeys() {
synchronized (_supportedKeys) {
if (_supportedKeys.size() == 0) {
for (Value val : _vals) {
if (val.isPrivate())
continue;
List<String> keys = val.getPropertyKeys();
for (String key : keys) {
_supportedKeys.add(fixPrefix(key));
}
}
}
}
//OJ2257: Return a copy of _supportedKeys as calls to this method (e.g.
//BrokerImpl.getSupportedProperties()) may add to this set.
return new TreeSet<String>(_supportedKeys);
}
代码示例来源:origin: org.apache.openjpa/openjpa-all
/**
* Gets all known property keys.
* The keys are harvested from the property names (including the equivalent names) of the registered values.
* A key may be prefixed if the corresponding property name was without a prefix.
* @see #fixPrefix(String)
* The Values that are {@linkplain Value#makePrivate() marked private} are filtered out.
*/
public Set<String> getPropertyKeys() {
synchronized (_supportedKeys) {
if (_supportedKeys.size() == 0) {
for (Value val : _vals) {
if (val.isPrivate())
continue;
List<String> keys = val.getPropertyKeys();
for (String key : keys) {
_supportedKeys.add(fixPrefix(key));
}
}
}
}
//OJ2257: Return a copy of _supportedKeys as calls to this method (e.g.
//BrokerImpl.getSupportedProperties()) may add to this set.
return new TreeSet<String>(_supportedKeys);
}
代码示例来源:origin: org.apache.openjpa/openjpa-lib
/**
* 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);
}
代码示例来源:origin: org.apache.openjpa/openjpa-all
/**
* 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);
}
代码示例来源:origin: org.apache.openejb.patch/openjpa
/**
* 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);
}
内容来源于网络,如有侵权,请联系作者删除!