@Money

Meta-annotation for an optional java.math.BigDecimal property or parameter representing a monetary amount.

API

Money.java
@interface Money {
  int INTEGER;
  int FRACTION;
  @AliasFor(annotation = Property.class, attribute = "optionality")
Optionality propertyOptionality() default Optionality.OPTIONAL;
  @AliasFor(annotation = Parameter.class, attribute = "optionality")
Optionality parameterOptionality() default Optionality.OPTIONAL;
  @AliasFor(annotation = javax.jdo.annotations.Column.class, attribute = "allowsNull")
String columnAllowsNull() default "true";
  @AliasFor(annotation = javax.jdo.annotations.Column.class, attribute = "length")
int columnLength() default Money.INTEGER + Money.FRACTION;
  @AliasFor(annotation = javax.jdo.annotations.Column.class, attribute = "scale")
int columnScale() default Money.FRACTION;
  @AliasFor(annotation = jakarta.validation.constraints.Digits.class, attribute = "integer")
int digitsInteger() default Money.INTEGER;
  @AliasFor(annotation = jakarta.validation.constraints.Digits.class, attribute = "fraction")
int digitsFraction() default Money.FRACTION;
}