Java 类org.hibernate.type.descriptor.sql.BasicExtractor 实例源码

项目:hibernate-types    文件:ArraySqlTypeDescriptor.java   
@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);
        }
    };
}
项目:hibernate-types    文件:AbstractJsonSqlTypeDescriptor.java   
@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);
        }
    };
}
项目:windup-rulesets    文件:DstSafeDateTypeDescriptor.java   
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);  
   } 
  } 
 }; 
}