本文整理了Java中org.apache.openjpa.lib.conf.Value.assertChangeable()
方法的一些代码示例,展示了Value.assertChangeable()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Value.assertChangeable()
方法的具体详情如下:
包路径:org.apache.openjpa.lib.conf.Value
类名称:Value
方法名:assertChangeable
[英]Asserts if this receiver can be changed. Subclasses must invoke this method before changing its internal state. This receiver can not be changed if all of the following is true
代码示例来源:origin: org.apache.openjpa/openjpa-all
/**
* Set this value from the given string. If the given string is null or
* empty and a default is defined, the default is used. If the given
* string(or default) is an alias key, it will be converted to the
* corresponding value internally.
* <br>
* If this Value is being set to a non-default value for the first time
* (as designated by <code>originalString</code> being null), then the
* value is remembered as <em>original</em>. This original value is used
* for equality and hashCode computation if this Value is
* {@link #isDynamic() dynamic}.
*
*/
public void setString(String val) {
assertChangeable();
String str = unalias(val);
try {
setInternalString(str);
if (originalValue == null && val != null && !isDefault(val)) {
originalValue = getString();
}
} catch (ParseException pe) {
throw pe;
} catch (RuntimeException re) {
throw new ParseException(prop + ": " + val, re);
}
}
代码示例来源:origin: org.apache.openejb.patch/openjpa
/**
* Set this value from the given string. If the given string is null or
* empty and a default is defined, the default is used. If the given
* string(or default) is an alias key, it will be converted to the
* corresponding value internally.
* <br>
* If this Value is being set to a non-default value for the first time
* (as designated by <code>originalString</code> being null), then the
* value is remembered as <em>original</em>. This original value is used
* for equality and hashCode computation if this Value is
* {@link #isDynamic() dynamic}.
*
*/
public void setString(String val) {
assertChangeable();
String str = unalias(val);
try {
setInternalString(str);
if (originalValue == null && val != null && !isDefault(val)) {
originalValue = getString();
}
} catch (ParseException pe) {
throw pe;
} catch (RuntimeException re) {
throw new ParseException(prop + ": " + val, re);
}
}
代码示例来源:origin: org.apache.openjpa/openjpa-lib
/**
* Set this value from the given string. If the given string is null or
* empty and a default is defined, the default is used. If the given
* string(or default) is an alias key, it will be converted to the
* corresponding value internally.
* <br>
* If this Value is being set to a non-default value for the first time
* (as designated by <code>originalString</code> being null), then the
* value is remembered as <em>original</em>. This original value is used
* for equality and hashCode computation if this Value is
* {@link #isDynamic() dynamic}.
*
*/
public void setString(String val) {
assertChangeable();
String str = unalias(val);
try {
setInternalString(str);
if (originalValue == null && val != null && !isDefault(val)) {
originalValue = getString();
}
} catch (ParseException pe) {
throw pe;
} catch (RuntimeException re) {
throw new ParseException(prop + ": " + val, re);
}
}
代码示例来源:origin: org.apache.openjpa/com.springsource.org.apache.openjpa
/**
* Set this value from the given string. If the given string is null or
* empty and a default is defined, the default is used. If the given
* string(or default) is an alias key, it will be converted to the
* corresponding value internally.
* <br>
* If this Value is being set to a non-default value for the first time
* (as designated by <code>originalString</code> being null), then the
* value is remembered as <em>original</em>. This original value is used
* for equality and hashCode computation if this Value is
* {@link #isDynamic() dynamic}.
*
*/
public void setString(String val) {
assertChangeable();
String str = unalias(val);
try {
setInternalString(str);
if (originalValue == null && val != null && !isDefault(val)) {
originalValue = getString();
}
} catch (ParseException pe) {
throw pe;
} catch (RuntimeException re) {
throw new ParseException(prop + ": " + val, re);
}
}
内容来源于网络,如有侵权,请联系作者删除!