本文整理了Java中org.apache.openjpa.lib.util.Options.setInto()
方法的一些代码示例,展示了Options.setInto()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Options.setInto()
方法的具体详情如下:
包路径:org.apache.openjpa.lib.util.Options
类名称:Options
方法名:setInto
[英]This method uses reflection to set all the properties in the given object that are named by the keys in this map. For a given key 'foo', the algorithm will look for a 'setFoo' method in the given instance. For a given key 'foo.bar', the algorithm will first look for a 'getFoo' method in the given instance, then will recurse on the return value of that method, now looking for the 'bar' property. This allows the setting of nested object properties. If in the above example the 'getFoo' method is not present or returns null, the algorithm will look for a 'setFoo' method; if found it will constrct a new instance of the correct type, set it using the 'setFoo' method, then recurse on it as above. Property names can be nested in this way to an arbitrary depth. For setter methods that take multiple parameters, the value mapped to the key can use the ',' as an argument separator character. If not enough values are present for a given method after splitting the string on ',', the remaining arguments will receive default values. All arguments are converted from string form to the correct type if possible(i.e. if the type is primitive, java.lang.Clas, or has a constructor that takes a single string argument). Examples:
"age"->"12"
obj.setAge(12)
"range"->"1,20"
obj.setRange(1, 20)
"range"->"10"
obj.setRange(10, 10)
"brother.name"->"Bob"
obj.getBrother().setName("Bob") [[$7$]]
"age"->"12"
obj.setAge(12)
"range"->"1,20"
obj.setRange(1, 20)
"range"->"10"
obj.setRange(10, 10)
"brother.name"->"Bob"
obj.getBrother().setName("Bob") [[$7$]]
代码示例来源:origin: org.apache.openjpa/com.springsource.org.apache.openjpa
public void setInto(Options opts) {
opts.keySet().retainAll(opts.setInto(_def).keySet());
}
代码示例来源:origin: org.apache.openjpa/openjpa-persistence
public void setInto(Options opts) {
opts.keySet().retainAll(opts.setInto(_def).keySet());
}
代码示例来源:origin: org.apache.openjpa/openjpa-all
public void setInto(Options opts) {
opts.keySet().retainAll(opts.setInto(_def).keySet());
}
代码示例来源:origin: org.apache.openejb.patch/openjpa-persistence
public void setInto(Options opts) {
opts.keySet().retainAll(opts.setInto(_def).keySet());
}
代码示例来源:origin: org.apache.openejb.patch/openjpa
public void setInto(Options opts) {
opts.keySet().retainAll(opts.setInto(_def).keySet());
}
代码示例来源:origin: org.apache.openejb.patch/openjpa
entry = (Map.Entry) itr.next();
if (!containsKey(entry.getKey()))
setInto(obj, entry);
for (Iterator<?> itr = entrySet().iterator(); itr.hasNext();) {
e = (Map.Entry) itr.next();
if (!setInto(obj, e)) {
if (invalidEntries == null)
invalidEntries = new Options();
代码示例来源:origin: org.apache.openjpa/openjpa-all
entry = (Map.Entry) itr.next();
if (!containsKey(entry.getKey()))
setInto(obj, entry);
for (Iterator<?> itr = entrySet().iterator(); itr.hasNext();) {
e = (Map.Entry) itr.next();
if (!setInto(obj, e)) {
if (invalidEntries == null)
invalidEntries = new Options();
代码示例来源:origin: org.apache.openjpa/com.springsource.org.apache.openjpa
provider.setInto(conf);
opts.setInto(conf);
代码示例来源:origin: org.apache.openejb.patch/openjpa
provider.setInto(conf);
opts.setInto(conf);
代码示例来源:origin: org.apache.openjpa/openjpa-all
provider.setInto(conf);
opts.setInto(conf);
代码示例来源:origin: org.apache.openjpa/openjpa-lib
provider.setInto(conf);
opts.setInto(conf);
代码示例来源:origin: org.apache.openejb.patch/openjpa-kernel
formatOpts.setInto(flags.format);
代码示例来源:origin: org.apache.openejb.patch/openjpa
formatOpts.setInto(flags.format);
代码示例来源:origin: org.apache.openjpa/openjpa-kernel
formatOpts.setInto(flags.format);
代码示例来源:origin: org.apache.openjpa/com.springsource.org.apache.openjpa
formatOpts.setInto(flags.format);
代码示例来源:origin: org.apache.openjpa/openjpa-all
formatOpts.setInto(flags.format);
代码示例来源:origin: org.apache.openjpa/com.springsource.org.apache.openjpa
configurable.startConfiguration();
Options invalidEntries = opts.setInto(obj);
if (obj instanceof GenericConfigurable)
((GenericConfigurable) obj).setInto(invalidEntries);
代码示例来源:origin: org.apache.openjpa/openjpa-all
configurable.startConfiguration();
Options invalidEntries = opts.setInto(obj);
if (obj instanceof GenericConfigurable)
((GenericConfigurable) obj).setInto(invalidEntries);
代码示例来源:origin: org.apache.openejb.patch/openjpa
configurable.startConfiguration();
Options invalidEntries = opts.setInto(obj);
if (obj instanceof GenericConfigurable)
((GenericConfigurable) obj).setInto(invalidEntries);
代码示例来源:origin: org.apache.openjpa/openjpa-lib
configurable.startConfiguration();
Options invalidEntries = opts.setInto(obj);
if (obj instanceof GenericConfigurable)
((GenericConfigurable) obj).setInto(invalidEntries);
内容来源于网络,如有侵权,请联系作者删除!