本文整理汇总了Java中org.hibernate.type.descriptor.sql.BasicExtractor类的典型用法代码示例。如果您正苦于以下问题:Java BasicExtractor类的具体用法?Java BasicExtractor怎么用?Java BasicExtractor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BasicExtractor类属于org.hibernate.type.descriptor.sql包,在下文中一共展示了BasicExtractor类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getExtractor
import org.hibernate.type.descriptor.sql.BasicExtractor; //导入依赖的package包/类
@Override
public <X> ValueExtractor<X> getExtractor(final JavaTypeDescriptor<X> javaTypeDescriptor) {
return new BasicExtractor<X>(javaTypeDescriptor, this) {
@Override
protected X doExtract(ResultSet rs, String name, WrapperOptions options) throws SQLException {
return javaTypeDescriptor.wrap(rs.getArray(name), options);
}
};
}
示例2: getExtractor
import org.hibernate.type.descriptor.sql.BasicExtractor; //导入依赖的package包/类
@Override
public <X> ValueExtractor<X> getExtractor(final JavaTypeDescriptor<X> javaTypeDescriptor) {
return new BasicExtractor<X>(javaTypeDescriptor, this) {
@Override
protected X doExtract(ResultSet rs, String name, WrapperOptions options) throws SQLException {
return javaTypeDescriptor.wrap(rs.getObject(name), options);
}
};
}
示例3: getExtractor
import org.hibernate.type.descriptor.sql.BasicExtractor; //导入依赖的package包/类
public <X> ValueExtractor<X> getExtractor(
final JavaTypeDescriptor<X> javaTypeDescriptor) {
return new BasicExtractor<X>(javaTypeDescriptor, (SqlTypeDescriptor) this) {
@Override
protected X doExtract(ResultSet rs, String name,
WrapperOptions options) throws SQLException {
if (cal == null) {
return javaTypeDescriptor.wrap(rs.getDate(name), options);
} else {
return javaTypeDescriptor.wrap(rs.getDate(name, cal), options);
}
}
};
}