org.hibernate.annotations.ColumnTransformer Java Examples
The following examples show how to use
org.hibernate.annotations.ColumnTransformer.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Ejb3Column.java From lams with GNU General Public License v2.0 | 6 votes |
private void processExpression(ColumnTransformer annotation) { if ( annotation == null ) { return; } final String nonNullLogicalColumnName = logicalColumnName != null ? logicalColumnName //use the default for annotations : ""; if ( 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; } } }
Example #2
Source File: Ejb3Column.java From lams with GNU General Public License v2.0 | 5 votes |
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 ); } } } } }
Example #3
Source File: PostgreSQLEncryptTest.java From high-performance-java-persistence with Apache License 2.0 | 5 votes |
@ColumnTransformer( read = """ pgp_sym_decrypt( storage, current_setting('encrypt.key') ) """, write = """ pgp_sym_encrypt( ?, current_setting('encrypt.key') ) """ )