本文整理了Java中org.apache.openjpa.kernel.Filters.getDefaultForNull()
方法的一些代码示例,展示了Filters.getDefaultForNull()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Filters.getDefaultForNull()
方法的具体详情如下:
包路径:org.apache.openjpa.kernel.Filters
类名称:Filters
方法名:getDefaultForNull
暂无
代码示例来源:origin: org.apache.openejb.patch/openjpa
public Object load(ExpContext ctx, ExpState state, Result res)
throws SQLException {
Object value = res.getObject(this, JavaSQLTypes.JDBC_DEFAULT, null);
Class<?> type = getType();
if (value == null) {
if (nullableValue(ctx, state)) { // OPENJPA-1794
return null;
}
else if (type.isPrimitive() || Number.class.isAssignableFrom(type)) {
value = Filters.getDefaultForNull(Filters.wrap(type));
}
}
return Filters.convert(value, type);
}
代码示例来源:origin: org.apache.openjpa/openjpa-jdbc
public Object load(ExpContext ctx, ExpState state, Result res)
throws SQLException {
Object value = res.getObject(this, JavaSQLTypes.JDBC_DEFAULT, null);
Class<?> type = getType();
if (value == null) {
if (nullableValue(ctx, state)) { // OPENJPA-1794
return null;
}
else if (type.isPrimitive() || Number.class.isAssignableFrom(type)) {
value = Filters.getDefaultForNull(Filters.wrap(type));
}
}
return Filters.convert(value, type);
}
代码示例来源:origin: org.apache.openjpa/openjpa-all
public Object load(ExpContext ctx, ExpState state, Result res)
throws SQLException {
Object value = res.getObject(this, JavaSQLTypes.JDBC_DEFAULT, null);
Class<?> type = getType();
if (value == null) {
if (nullableValue(ctx, state)) { // OPENJPA-1794
return null;
}
else if (type.isPrimitive() || Number.class.isAssignableFrom(type)) {
value = Filters.getDefaultForNull(Filters.wrap(type));
}
}
return Filters.convert(value, type);
}
代码示例来源:origin: org.apache.openejb.patch/openjpa-jdbc
public Object load(ExpContext ctx, ExpState state, Result res)
throws SQLException {
Object value = res.getObject(this, JavaSQLTypes.JDBC_DEFAULT, null);
Class<?> type = getType();
if (value == null) {
if (nullableValue(ctx, state)) { // OPENJPA-1794
return null;
}
else if (type.isPrimitive() || Number.class.isAssignableFrom(type)) {
value = Filters.getDefaultForNull(Filters.wrap(type));
}
}
return Filters.convert(value, type);
}
内容来源于网络,如有侵权,请联系作者删除!