private String value3 = ""; @Past private Date value4 = cal.getTime();
throwValidationException(((Past) annotate).message());
private static class Person { @Past private Instant birthday; public void setBirthday(Instant birthday) { this.birthday = birthday; } }
private void appendPastValidator(SourceWriter w, JField field) { Past pastAnnotation = field.getAnnotation(Past.class); if (pastAnnotation != null) { w.println(", new PastValidator(\"%s\")", pastAnnotation.message()); } }
public class Person { String name; @Past Date birthday; } }
private void appendPastValidator(SourceWriter w, JField field) { Past pastAnnotation = field.getAnnotation(Past.class); if (pastAnnotation != null) { w.println(", new PastValidator(\"%s\")", pastAnnotation.message()); } }
@Past public String getValue() { return null; } }
getValidationMessage(property, a.message(), Validator.ValidationMessage.PAST))); LOGGER.debug(() -> "BeanPropertyBeanValidationPostProcessor: added validator to property [" + property + "] for constraint [" + Past.class.getName() + "]");
public class Person { String name; @Past Date birthday; }
public Order06(@Past Date creationDate) { this.creationDate = creationDate; }
@Past(message="Invalid past date") private java.util.Date past;
public void setName(@Past String name) { }
public class PastRelativePartialDummyEntity { @Past private LocalTime localTime; @Past private MonthDay monthDay; @Past private OffsetTime offsetTime; public PastRelativePartialDummyEntity() { } public PastRelativePartialDummyEntity(ZonedDateTime dateTime) { localTime = dateTime.toLocalTime(); monthDay = MonthDay.from( dateTime ); offsetTime = OffsetTime.from( dateTime ); } }
public Address(@Past String name) { } }
@Past public Email() { }
public class PastRelativePartialDummyEntity { @Past private LocalTime localTime; @Past private MonthDay monthDay; @Past private OffsetTime offsetTime; public PastRelativePartialDummyEntity() { } public PastRelativePartialDummyEntity(ZonedDateTime dateTime) { localTime = dateTime.toLocalTime(); monthDay = MonthDay.from( dateTime ); offsetTime = OffsetTime.from( dateTime ); } }
@Past private Calendar calendar; @Past private Date date; @Past private HijrahDate hijrahDate; @Past private Instant instant; @Past private JapaneseDate japaneseDate; @Past private LocalDate localDate; @Past private LocalDateTime localDateTime; @Past private MinguoDate minguoDate; @Past private OffsetDateTime offsetDateTime; @Past private ThaiBuddhistDate thaiBuddhistDate;
@Past private Calendar calendar; @Past private Date date; @Past private HijrahDate hijrahDate; @Past private Instant instant; @Past private JapaneseDate japaneseDate; @Past private LocalDate localDate; @Past private LocalDateTime localDateTime; @Past private MinguoDate minguoDate; @Past private OffsetDateTime offsetDateTime; @Past private ThaiBuddhistDate thaiBuddhistDate;
public class PersonModel { @NotNull @Size(min = 1, max = 16) private String firstName; @NotNull @Size(min = 1, max = 16) private String lastName; @NotNull @Past private Calendar birthDate; public PersonModel(String firstName, String lastName, Calendar birthDate) { super(); this.firstName = firstName; this.lastName = lastName; this.birthDate = birthDate; } }