本文整理了Java中org.apache.openjpa.lib.conf.Value.getProperty()
方法的一些代码示例,展示了Value.getProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Value.getProperty()
方法的具体详情如下:
包路径:org.apache.openjpa.lib.conf.Value
类名称:Value
方法名:getProperty
[英]The property name that will be used when setting or getting this value in a Map.
[中]在映射中设置或获取此值时将使用的属性名称。
代码示例来源:origin: org.apache.openjpa/openjpa-all
/**
* Affirms if the given key matches the property (or any of its equivalent).
*
* @since 2.0.0
*/
public boolean matches(String p) {
return getProperty().equals(p) ||
(otherNames != null && otherNames.contains(p));
}
代码示例来源:origin: org.apache.openjpa/openjpa-lib
/**
* Affirms if the given key matches the property (or any of its equivalent).
*
* @since 2.0.0
*/
public boolean matches(String p) {
return getProperty().equals(p) ||
(otherNames != null && otherNames.contains(p));
}
代码示例来源:origin: org.apache.openejb.patch/openjpa
/**
* Affirms if the given key matches the property (or any of its equivalent).
*
* @since 2.0.0
*/
public boolean matches(String p) {
return getProperty().equals(p) ||
(otherNames != null && otherNames.contains(p));
}
代码示例来源:origin: org.apache.openjpa/com.springsource.org.apache.openjpa
public Value getValue(String property) {
if (property == null)
return null;
// search backwards so that custom values added after construction
// are found quickly, since this will be the std way of accessing them
Value val;
for (int i = _vals.size() - 1; i >= 0; i--) {
val = (Value) _vals.get(i);
if (val.getProperty().equals(property))
return val;
}
return null;
}
代码示例来源:origin: org.apache.openjpa/openjpa-lib
/**
* 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 {@link #getProperty()} method.
*
* @since 2.0.0
*/
public List<String> getPropertyKeys() {
List<String> result = new ArrayList<String>(1 +
(otherNames ==null ? 0 : otherNames.size()));
result.add(getProperty());
if (otherNames != null)
result.addAll(otherNames);
return Collections.unmodifiableList(result);
}
代码示例来源:origin: org.apache.openjpa/com.springsource.org.apache.openjpa
/**
* Return a comprehensive list of recognized map keys.
*/
private Collection newPropertyList() {
String[] prefixes = ProductDerivations.getConfigurationPrefixes();
List l = new ArrayList(_vals.size() * prefixes.length);
for (int i = 0; i < _vals.size(); i++) {
for (int j = 0; j < prefixes.length; j++)
l.add(prefixes[j] + "." + ((Value) _vals.get(i)).getProperty());
}
return l;
}
代码示例来源:origin: org.apache.openejb.patch/openjpa
/**
* Return a comprehensive list of recognized map keys.
*/
private Collection<String> newPropertyList() {
String[] prefixes = ProductDerivations.getConfigurationPrefixes();
List<String> l = new ArrayList<String>(_vals.size() * prefixes.length);
for(Value v : _vals) {
for (int j = 0; j < prefixes.length; j++)
l.add(prefixes[j] + "." + v.getProperty());
}
return l;
}
代码示例来源:origin: org.apache.openjpa/openjpa-lib
/**
* Return a comprehensive list of recognized map keys.
*/
private Collection<String> newPropertyList() {
String[] prefixes = ProductDerivations.getConfigurationPrefixes();
List<String> l = new ArrayList<String>(_vals.size() * prefixes.length);
for(Value v : _vals) {
for (int j = 0; j < prefixes.length; j++)
l.add(prefixes[j] + "." + v.getProperty());
}
return l;
}
代码示例来源:origin: org.apache.openjpa/openjpa-all
/**
* Return a comprehensive list of recognized map keys.
*/
private Collection<String> newPropertyList() {
String[] prefixes = ProductDerivations.getConfigurationPrefixes();
List<String> l = new ArrayList<String>(_vals.size() * prefixes.length);
for(Value v : _vals) {
for (int j = 0; j < prefixes.length; j++)
l.add(prefixes[j] + "." + v.getProperty());
}
return l;
}
代码示例来源:origin: org.apache.openjpa/com.springsource.org.apache.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 put(Map map, Value val, Object o) {
Object key = val.getLoadKey();
if (key == null)
key = "openjpa." + val.getProperty();
map.put(key, o);
}
代码示例来源:origin: org.apache.openjpa/com.springsource.org.apache.openjpa
/**
* Look up the given value, testing all available prefixes.
*/
private Object get(Map map, Value val, boolean setLoadKey) {
String key = ProductDerivations.getConfigurationKey(
val.getProperty(), map);
if (map.containsKey(key) && setLoadKey)
val.setLoadKey(key);
return map.get(key);
}
代码示例来源:origin: org.apache.openjpa/openjpa-lib
public String toString() {
return getProperty()+ ":" + get() + "[" + getValueType().getName() + "]";
}
}
代码示例来源:origin: org.apache.openjpa/openjpa-all
public String toString() {
return getProperty()+ ":" + get() + "[" + getValueType().getName() + "]";
}
}
代码示例来源:origin: org.apache.openejb.patch/openjpa
public String toString() {
return getProperty()+ ":" + get() + "[" + getValueType().getName() + "]";
}
}
代码示例来源:origin: org.apache.openjpa/com.springsource.org.apache.openjpa
public void valueChanged(Value val) {
if (_changeSupport == null && _props == null)
return;
String newString = val.getString();
if (_changeSupport != null)
_changeSupport.firePropertyChange(val.getProperty(), null,
newString);
// keep cached props up to date
if (_props != null) {
if (newString == null)
Configurations.removeProperty(val.getProperty(), _props);
else if (Configurations.containsProperty(val.getProperty(), _props)
|| val.getDefault() == null
|| !val.getDefault().equals(newString))
put(_props, val, newString);
}
}
代码示例来源:origin: org.apache.openjpa/openjpa-all
public void valueChanged(Value val) {
if (_changeSupport == null && _props == null)
return;
String newString = val.getString();
if (_changeSupport != null)
_changeSupport.firePropertyChange(val.getProperty(), null, newString);
// keep cached props up to date
if (_props != null) {
if (newString == null)
Configurations.removeProperty(val.getProperty(), _props);
else if (Configurations.containsProperty(val, _props)
|| val.getDefault() == null
|| !val.getDefault().equals(newString))
setValue(_props, val);
}
}
代码示例来源:origin: org.apache.openejb.patch/openjpa
public void valueChanged(Value val) {
if (_changeSupport == null && _props == null)
return;
String newString = val.getString();
if (_changeSupport != null)
_changeSupport.firePropertyChange(val.getProperty(), null, newString);
// keep cached props up to date
if (_props != null) {
if (newString == null)
Configurations.removeProperty(val.getProperty(), _props);
else if (Configurations.containsProperty(val, _props)
|| val.getDefault() == null
|| !val.getDefault().equals(newString))
setValue(_props, val);
}
}
代码示例来源:origin: org.apache.openjpa/openjpa-lib
public void valueChanged(Value val) {
if (_changeSupport == null && _props == null)
return;
String newString = val.getString();
if (_changeSupport != null)
_changeSupport.firePropertyChange(val.getProperty(), null, newString);
// keep cached props up to date
if (_props != null) {
if (newString == null)
Configurations.removeProperty(val.getProperty(), _props);
else if (Configurations.containsProperty(val, _props)
|| val.getDefault() == null
|| !val.getDefault().equals(newString))
setValue(_props, val);
}
}
代码示例来源:origin: org.apache.openjpa/openjpa-all
/**
* Asserts if this receiver can be changed.
* Subclasses <em>must</em> invoke this method before changing its
* internal state.
*
* This receiver can not be changed if all of the following is true
* <LI>this receiver is not dynamic
* <LI>ValueListener attached to this receiver is a Configuration
* <LI>Configuration is read-only
*/
protected void assertChangeable() {
if (!isDynamic() && containsReadOnlyConfigurationAsListener()) {
throw new RuntimeException(s_loc.get("veto-change",
this.getProperty()).toString());
}
}
代码示例来源:origin: org.apache.openjpa/openjpa-lib
/**
* Asserts if this receiver can be changed.
* Subclasses <em>must</em> invoke this method before changing its
* internal state.
*
* This receiver can not be changed if all of the following is true
* <LI>this receiver is not dynamic
* <LI>ValueListener attached to this receiver is a Configuration
* <LI>Configuration is read-only
*/
protected void assertChangeable() {
if (!isDynamic() && containsReadOnlyConfigurationAsListener()) {
throw new RuntimeException(s_loc.get("veto-change",
this.getProperty()).toString());
}
}
内容来源于网络,如有侵权,请联系作者删除!