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