本文整理了Java中org.apache.openjpa.kernel.Filters.promote()
方法的一些代码示例,展示了Filters.promote()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Filters.promote()
方法的具体详情如下:
包路径:org.apache.openjpa.kernel.Filters
类名称:Filters
方法名:promote
[英]Given two types, return type they should both be converted to before performing any operations between them.
[中]给定两种类型,在执行它们之间的任何操作之前,都应该将它们转换为返回类型。
代码示例来源:origin: org.apache.openjpa/openjpa-all
public Class getType() {
Class c1 = _val[0].getType();
for (int i = 1; i < _val.length; i++) {
Class c2 = _val[i].getType();
c1 = Filters.promote(c1, c2);
}
return c1;
}
代码示例来源:origin: org.apache.openejb.patch/openjpa-jdbc
public Class getType() {
if (_cast != null)
return _cast;
Class c1 = _val1.getType();
Class c2 = _val2.getType();
Class type = Filters.promote(c1, c2);
if (type == Raw.class)
return String.class;
return type;
}
代码示例来源:origin: org.apache.openejb.patch/openjpa
public Class getType() {
if (_cast != null)
return _cast;
Class c1 = _val1.getType();
Class c2 = _val2.getType();
return Filters.promote(c1, c2);
}
代码示例来源:origin: org.apache.openejb.patch/openjpa
public Class getType() {
Class c1 = _val1.getType();
Class c2 = _val2.getType();
return Filters.promote(c1, c2);
}
代码示例来源:origin: org.apache.openejb.patch/openjpa
public Class getType() {
Class c1 = _val[0].getType();
for (int i = 1; i < _val.length; i++) {
Class c2 = _val[i].getType();
c1 = Filters.promote(c1, c2);
}
return c1;
}
代码示例来源:origin: org.apache.openejb.patch/openjpa
public Class getType() {
if (_cast != null)
return _cast;
Class type = _vals[0].getType();
for (int i = 1; i < _vals.length; i++)
type = Filters.promote(type, _vals[i].getType());
if (type == Raw.class)
return String.class;
return type;
}
代码示例来源:origin: org.apache.openejb.patch/openjpa
public Class getType() {
if (_cast != null)
return _cast;
Class c1 = _val1.getType();
Class c2 = _val2.getType();
Class type = Filters.promote(c1, c2);
if (type == Raw.class)
return String.class;
return type;
}
代码示例来源:origin: org.apache.openjpa/openjpa-all
public Class getType() {
if (_cast != null)
return _cast;
Class type = _vals[0].getType();
for (int i = 1; i < _vals.length; i++)
type = Filters.promote(type, _vals[i].getType());
if (type == Raw.class)
return String.class;
return type;
}
代码示例来源:origin: org.apache.openjpa/openjpa-all
public Class getType() {
if (_cast != null)
return _cast;
Class c1 = _val1.getType();
Class c2 = _val2.getType();
return Filters.promote(c1, c2);
}
代码示例来源:origin: org.apache.openejb.patch/openjpa-kernel
public Class getType() {
Class c1 = _val[0].getType();
for (int i = 1; i < _val.length; i++) {
Class c2 = _val[i].getType();
c1 = Filters.promote(c1, c2);
}
return c1;
}
代码示例来源:origin: org.apache.openejb.patch/openjpa-jdbc
public Class getType() {
if (_cast != null)
return _cast;
Class c1 = _val1.getType();
Class c2 = _val2.getType();
return Filters.promote(c1, c2);
}
代码示例来源:origin: org.apache.openjpa/openjpa-all
public Class getType() {
Class c1 = _val.getType();
for (int i = 0; i < _exp.length; i++) {
Class c2 = ((WhenScalar) _exp[i]).getVal1().getType();
c1 = Filters.promote(c1, c2);
}
return c1;
}
代码示例来源:origin: org.apache.openjpa/openjpa-all
public Class getType() {
Class c1 = _val.getType();
for (int i = 0; i < _exp.length; i++) {
Class c2 = ((WhenCondition) _exp[i]).getVal().getType();
c1 = Filters.promote(c1, c2);
}
return c1;
}
代码示例来源:origin: org.apache.openjpa/openjpa-kernel
protected boolean eval(Object candidate, Object orig,
StoreContext ctx, Object[] params) {
Object o1 = _val1.eval(candidate, orig, ctx, params);
Object o2 = _val2.eval(candidate, orig, ctx, params);
if (o1 != null && o2 != null) {
Class c = Filters.promote(o1.getClass(), o2.getClass());
o1 = Filters.convert(o1, c);
o2 = Filters.convert(o2, c);
}
return compare(o1, o2);
}
代码示例来源:origin: org.apache.openejb.patch/openjpa-kernel
public Class getType() {
Class c1 = _val.getType();
for (int i = 0; i < _exp.length; i++) {
Class c2 = ((WhenScalar) _exp[i]).getVal1().getType();
c1 = Filters.promote(c1, c2);
}
return c1;
}
代码示例来源:origin: org.apache.openejb.patch/openjpa-kernel
public Class getType() {
Class c1 = _val.getType();
for (int i = 0; i < _exp.length; i++) {
Class c2 = ((WhenCondition) _exp[i]).getVal().getType();
c1 = Filters.promote(c1, c2);
}
return c1;
}
代码示例来源:origin: org.apache.openjpa/openjpa-all
public Class getType() {
if (_cast != null)
return _cast;
Class type = _val.getType();
for (int i = 0; i < _exp.length; i++)
type = Filters.promote(type,
((WhenScalar) _exp[i]).getVal2().getType());
if (type == Raw.class)
return String.class;
return type;
}
代码示例来源:origin: org.apache.openejb.patch/openjpa-kernel
protected boolean eval(Object candidate, Object orig,
StoreContext ctx, Object[] params) {
Object o1 = _val1.eval(candidate, orig, ctx, params);
Object o2 = _val2.eval(candidate, orig, ctx, params);
if (o1 != null && o2 != null) {
Class c = Filters.promote(o1.getClass(), o2.getClass());
o1 = Filters.convert(o1, c);
o2 = Filters.convert(o2, c);
}
return compare(o1, o2);
}
代码示例来源:origin: org.apache.openejb.patch/openjpa-jdbc
public Class getType() {
if (_cast != null)
return _cast;
Class type = _val.getType();
for (int i = 0; i < _exp.length; i++)
type = Filters.promote(type,
((WhenScalar) _exp[i]).getVal2().getType());
if (type == Raw.class)
return String.class;
return type;
}
代码示例来源:origin: org.apache.openejb.patch/openjpa-jdbc
public Class getType() {
if (_cast != null)
return _cast;
Class type = _val.getType();
for (int i = 0; i < _exp.length; i++)
type = Filters.promote(type,
((WhenCondition) _exp[i]).getVal().getType());
if (type == Raw.class)
return String.class;
return type;
}
内容来源于网络,如有侵权,请联系作者删除!