javax.validation.constraints.Future类的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(6.2k)|赞(0)|评价(0)|浏览(373)

本文整理了Java中javax.validation.constraints.Future类的一些代码示例,展示了Future类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Future类的具体详情如下:
包路径:javax.validation.constraints.Future
类名称:Future

Future介绍

暂无

代码示例

代码示例来源:origin: prontera/spring-cloud-rest-tcc

@Getter
@Setter
@NoArgsConstructor
@ToString
@EqualsAndHashCode(callSuper = true)
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler", "fieldHandler"}, ignoreUnknown = true)
public class OrderParticipant extends BasicDomain {

  private static final long serialVersionUID = 2363383399737894835L;

  @URL
  @ApiModelProperty(value = "资源URI", required = true, example = "http://www.example.com/part/123")
  private String uri;

  @Future
  @ApiModelProperty(value = "过期时间, ISO标准", required = true, example = "2017-03-20T14:00:41+08:00")
  @JsonSerialize(using = OffsetDateTimeToIso8601Serializer.class)
  private OffsetDateTime expireTime;

  @NotNull
  @ApiModelProperty(value = "订单ID", required = true, example = "31")
  private Long orderId;

}

代码示例来源:origin: Impetus/Kundera

throwValidationException(((Future) annotate).message());

代码示例来源:origin: fr.putnami.pwt/pwt

private void appendFutureValidator(SourceWriter w, JField field) {
  Future futureAnnotation = field.getAnnotation(Future.class);
  if (futureAnnotation != null) {
    w.println(", new FutureValidator(\"%s\")", futureAnnotation.message());
  }
}

代码示例来源:origin: prontera/spring-cloud-rest-tcc

/**
 * @author Zhao Junjian
 */
@Getter
@Setter
@NoArgsConstructor
@ToString
@EqualsAndHashCode
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler", "fieldHandler"}, ignoreUnknown = true)
public class Participant implements Serializable {

  private static final long serialVersionUID = 4420192491905210084L;

  @URL
  @ApiModelProperty(value = "资源URI", required = true, example = "http://www.example.com/part/123")
  private String uri;

  @Future
  @ApiModelProperty(value = "过期时间, ISO标准", required = true, example = "2017-03-20T14:00:41+08:00")
  @JsonSerialize(using = OffsetDateTimeToIso8601Serializer.class)
  private OffsetDateTime expireTime;

}

代码示例来源:origin: Putnami/putnami-web-toolkit

private void appendFutureValidator(SourceWriter w, JField field) {
  Future futureAnnotation = field.getAnnotation(Future.class);
  if (futureAnnotation != null) {
    w.println(", new FutureValidator(\"%s\")", futureAnnotation.message());
  }
}

代码示例来源:origin: hibernate/hibernate-orm

public String name;
@Future
public Date expDate;

代码示例来源:origin: com.holon-platform.core/holon-core

getValidationMessage(property, a.message(), Validator.ValidationMessage.FUTURE)));
LOGGER.debug(() -> "BeanPropertyBeanValidationPostProcessor: added validator to property ["
    + property + "] for constraint [" + Future.class.getName() + "]");

代码示例来源:origin: hibernate/hibernate-validator

private Date value4 = cal.getTime();
@Future
private Date value5 = cal.getTime();

代码示例来源:origin: org.hibernate.beanvalidation.tck/beanvalidation-tck-tests

private class EntityWithNoContraintValidatorForUnwrappedValue {
  // no constraint validator for the wrapped value
  @Future(payload = { Unwrapping.Unwrap.class })
  private final ValueHolder<Integer> integerHolder = new ValueHolder<>( 5 );
}

代码示例来源:origin: org.hibernate.jsr303.tck/jsr303-tck

class FutureDummyEntity {
  @Future
  Calendar calendar;
  @Future
  Date date;
}

代码示例来源:origin: org.hibernate.beanvalidation.tck/beanvalidation-tck-tests

public class FutureRelativePartialDummyEntity {
  @Future
  private LocalTime localTime;
  @Future
  private MonthDay monthDay;
  @Future
  private OffsetTime offsetTime;
  public FutureRelativePartialDummyEntity() {
  }
  public FutureRelativePartialDummyEntity(ZonedDateTime dateTime) {
    localTime = dateTime.toLocalTime();
    monthDay = MonthDay.from( dateTime );
    offsetTime = OffsetTime.from( dateTime );
  }
}

代码示例来源:origin: Impetus/Kundera

@Future(message="Invalid future date.")
private java.util.Date future;

代码示例来源:origin: org.hibernate.beanvalidation.tck/beanvalidation-tck-tests

public class FutureRelativePartialDummyEntity {

  @Future
  private LocalTime localTime;

  @Future
  private MonthDay monthDay;

  @Future
  private OffsetTime offsetTime;

  public FutureRelativePartialDummyEntity() {
  }

  public FutureRelativePartialDummyEntity(ZonedDateTime dateTime) {
    localTime = dateTime.toLocalTime();
    monthDay = MonthDay.from( dateTime );
    offsetTime = OffsetTime.from( dateTime );
  }
}

代码示例来源:origin: org.hibernate.beanvalidation.tck/beanvalidation-tck-tests

@Future
private Calendar calendar;
@Future
private Date date;
@Future
private HijrahDate hijrahDate;
@Future
private Instant instant;
@Future
private JapaneseDate japaneseDate;
@Future
private LocalDate localDate;
@Future
private LocalDateTime localDateTime;
@Future
private MinguoDate minguoDate;
@Future
private OffsetDateTime offsetDateTime;
@Future
private ThaiBuddhistDate thaiBuddhistDate;

代码示例来源:origin: org.hibernate.beanvalidation.tck/beanvalidation-tck-tests

@Future
private Calendar calendar;
@Future
private Date date;
@Future
private HijrahDate hijrahDate;
@Future
private Instant instant;
@Future
private JapaneseDate japaneseDate;
@Future
private LocalDate localDate;
@Future
private LocalDateTime localDateTime;
@Future
private MinguoDate minguoDate;
@Future
private OffsetDateTime offsetDateTime;
@Future
private ThaiBuddhistDate thaiBuddhistDate;

代码示例来源:origin: org.hibernate.beanvalidation.tck/beanvalidation-tck-tests

@CrossParameterConstraint
public void createEvent(@NotNull Date start, @Future Date end) {
}

代码示例来源:origin: agoncal/agoncal-book-javaee7

@AssertTrue
public Boolean validate(@NotNull String number, @Future Date expiryDate, @NotNull Integer controlNumber, String type) {
 String lastDigit = validationAlgorithm.validate(number, controlNumber);
 if (Integer.parseInt(lastDigit.toString()) % 2 == 0) {
  return true;
 } else {
  return false;
 }
}

代码示例来源:origin: canoo/dolphin-platform

@RemotingBean
public class TestBeanFuture {

  @Future
  private Property<Date> date = new MockedProperty<>();

  @Future
  private Property<Calendar> calendar = new MockedProperty<>();

  public Property<Date> dateProperty() {
    return date;
  }

  public Property<Calendar> calendarProperty() {
    return calendar;
  }

}

代码示例来源:origin: spring-projects/spring-restdocs

private String digits;
@Future
private Date future;

代码示例来源:origin: remoting/dubbox

@Future // 必须为一个未来的时间
private Date expiryDate;

相关文章