001package io.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 * Specify the update mode for the specific entity type.
010 * <p>
011 * Control whether all 'loaded' properties are included in an Update or whether
012 * just properties that have changed will be included in the update.
013 * </p>
014 * <p>
015 * Note that the default can be set via ebean.properties.
016 * </p>
017 * <p>
018 * <pre>
019 * ## Set to update all loaded properties
020 * ebean.updateChangesOnly=false
021 * </pre>
022 */
023@Target({ElementType.TYPE})
024@Retention(RetentionPolicy.RUNTIME)
025public @interface UpdateMode {
026
027  /**
028   * Set to false if you want to include all the 'loaded' properties in the
029   * update. Otherwise, just the properties that have changed will be included
030   * in the update.
031   */
032  boolean updateChangesOnly() default true;
033
034}