@Documented @Retention(value=RUNTIME) @Target(value=METHOD) @ConstraintDefinition public @interface IntegerConstraint
Example:
public interface UserInfo extends Storable { int getAge(); @IntegerConstraint(min=0, max=120) void setAge(int value); int getRoleID(); @IntegerConstraint(allowed={ROLE_REGULAR, ROLE_ADMIN}) void setRoleID(int role); ... }
FloatConstraint
,
TextConstraint
Modifier and Type | Optional Element and Description |
---|---|
long[] |
allowed
Specific allowed values for property.
|
long[] |
disallowed
Specific disallowed values for property.
|
long |
max
Specify maximum allowed value for integer property.
|
long |
min
Specify minimum allowed value for integer property.
|
public abstract long[] allowed
public abstract long[] disallowed
public abstract long min
public abstract long max
Copyright © 2006-2013 Amazon Technologies, Inc.. All Rights Reserved.