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 a property to be an SUM aggregation.
010 * <p>
011 * <code>@Sum</code> is short hand for <code>@Aggregation("sum(...propertyName...)")</code>
012 * </p>
013 *
014 * <h3>Example:</h3>
015 * <pre>{@code
016 *
017 * @Sum
018 * BigDecimal distance;
019 *
020 * // is the same as:
021 *
022 * @Aggregation("sum(distance)")
023 * BigDecimal distance;
024 *
025 * }</pre>
026 */
027@Retention(RetentionPolicy.RUNTIME)
028@Target(ElementType.FIELD)
029public @interface Sum {
030
031}