Java 类org.hibernate.annotations.ColumnTransformer 实例源码

项目:lams    文件:Ejb3Column.java   
private void extractDataFromPropertyData(PropertyData inferredData) {
    if ( inferredData != null ) {
        XProperty property = inferredData.getProperty();
        if ( property != null ) {
            processExpression( property.getAnnotation( ColumnTransformer.class ) );
            ColumnTransformers annotations = property.getAnnotation( ColumnTransformers.class );
            if (annotations != null) {
                for ( ColumnTransformer annotation : annotations.value() ) {
                    processExpression( annotation );
                }
            }
        }
    }
}
项目:lams    文件:Ejb3Column.java   
private void processExpression(ColumnTransformer annotation) {
    String nonNullLogicalColumnName = logicalColumnName != null ? logicalColumnName : ""; //use the default for annotations
    if ( annotation != null &&
            ( StringHelper.isEmpty( annotation.forColumn() )
                    || annotation.forColumn().equals( nonNullLogicalColumnName ) ) ) {
        readExpression = annotation.read();
        if ( StringHelper.isEmpty( readExpression ) ) {
            readExpression = null;
        }
        writeExpression = annotation.write();
        if ( StringHelper.isEmpty( writeExpression ) ) {
            writeExpression = null;
        }
    }
}
项目:coordinated-entry    文件:Client.java   
@Type(type="org.jadira.usertype.dateandtime.threeten.PersistentLocalDateTime")
@Basic( optional = true )
@Column
@ColumnTransformer(
        read="convert_from(dob_decrypt(dob),'UTF-8')",
        write="dob_encrypt(?)")
public LocalDateTime getDob() {
    return this.dob;

}
项目:coordinated-entry    文件:Client.java   
@Basic( optional = true )
@Column
@ColumnTransformer(
        read="convert_from(ssn_decrypt(ssn),'UTF-8')",
        write="ssn_encrypt(?)")
public String getSsn() {
    return this.ssn;

}
项目:coordinated-entry    文件:ClientEntity.java   
@Type(type="org.jadira.usertype.dateandtime.threeten.PersistentLocalDateTime")
@Basic( optional = true )
@Column
@ColumnTransformer(
        read="convert_from(dob_decrypt(dob),'UTF-8')",
        write="dob_encrypt(?)")
public LocalDateTime getDob() {
    return this.dob;

}
项目:coordinated-entry    文件:ClientEntity.java   
@Basic( optional = true )
@Column
@ColumnTransformer(
        read="convert_from(ssn_decrypt(ssn),'UTF-8')",
        write="ssn_encrypt(?)")
public String getSsn() {
    return this.ssn;

}