@Target(value={METHOD,FIELD}) @Retention(value=RUNTIME) public @interface Formula
// perform calculations @Formula( "sub_total + (sub_total * tax)" ) long getTotalCost() { ... }
// call functions @Formula( "upper( substring( middle_name, 1 ) )" ) Character getMiddleInitial() { ... }
// this might be better handled through @ColumnTransformer @Formula( "decrypt(credit_card_num)" ) String getCreditCardNumber() { ... }
ColumnTransformer
public abstract String value
Copyright © 2016 JBoss by Red Hat. All rights reserved.