001package com.avaje.ebean.annotation;
002
003import java.lang.annotation.ElementType;
004import java.lang.annotation.Retention;
005import java.lang.annotation.RetentionPolicy;
006import java.lang.annotation.Target;
007
008/**
009 * An Update statement for a particular entity bean type.
010 * <p>
011 * The update can either be a sql insert,update or delete statement with tables
012 * and columns etc or the equivalent statement but with table names and columns
013 * expressed as bean types and bean properties.
014 * </p>
015 */
016@Target({ ElementType.TYPE })
017@Retention(RetentionPolicy.RUNTIME)
018public @interface NamedUpdate {
019
020  /**
021   * The name of the update.
022   */
023  String name();
024
025  /**
026   * The insert, update or delete statement.
027   */
028  String update();
029
030  /**
031   * Set this to false if you do not want the cache to be notified. If true the
032   * cache will invalidate appropriate objects from the cache (after a
033   * successful transaction commit).
034   */
035  boolean notifyCache() default true;
036
037}