1 package org.hibernate.annotations;2 3 import java.lang.annotation.Retention ;4 import java.lang.annotation.Target ;5 import static java.lang.annotation.ElementType.METHOD ;6 import static java.lang.annotation.ElementType.FIELD ;7 import static java.lang.annotation.RetentionPolicy.RUNTIME ;8 9 /**10 * Formula. To be used as a replacement for @Column in most places11 * The formula has to be a valid SQL fragment12 * @author Emmanuel Bernard13 */14 @Target ({METHOD, FIELD}) @Retention (RUNTIME)15 public @interface Formula {16 String value();17 }18