com.silverpeas.annotation.constraint
Annotation Type DateRange


@Target(value={TYPE,ANNOTATION_TYPE})
@Retention(value=RUNTIME)
@Constraint(validatedBy=DateRangeValidator.class)
@Documented
public @interface DateRange

Annotation for JSR-303 validator. It validates the range of dates are coherent: the end date is after or equals the start one.


Required Element Summary
 String endDate
          The name of the field representing the date ending a range.
 String startDate
          The name of the field representing the date starting a range.
 
Optional Element Summary
 Class<?>[] groups
           
 String message
           
 Class<? extends javax.validation.Payload>[] payload
           
 

Element Detail

startDate

public abstract String startDate
The name of the field representing the date starting a range.

Returns:
the field name of the range start date.

endDate

public abstract String endDate
The name of the field representing the date ending a range.

Returns:
the field name of the range end date.

message

public abstract String message
Default:
"The end date isn\'t after or equal the start date"

groups

public abstract Class<?>[] groups
Default:
{}

payload

public abstract Class<? extends javax.validation.Payload>[] payload
Default:
{}


Copyright © 2016 Silverpeas. All Rights Reserved.