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

x33g5p2x  于2022-01-24 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(514)

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

Null介绍

暂无

代码示例

代码示例来源:origin: primefaces/primefaces

private Map<Integer, List<T>> pages;
@Null
private String sortField;
@Null
private SortOrder sortOrder;
@Null
private List<SortMeta> multiSortMeta;
@Null
private Map<String, Object> filters;

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

/**
 * Checks whether a given date is that in past or not
 * 
 * @param validationObject
 * @param annotate
 * @return
 */
private boolean validateNull(Object validationObject, Annotation annotate)
{
  if (checkNullObject(validationObject))
  {
    return true;
  }
  if (!validationObject.equals(null) || validationObject != null)
  {
    throwValidationException(((Null) annotate).message());
  }
  return true;
}

代码示例来源:origin: sixt/ja-micro

private @Null Span span;
private @Null GoTimer handlerTimer;
private long startTime;

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

private void appendNullValidator(SourceWriter w, JField field) {
  Null nullAnnotation = field.getAnnotation(Null.class);
  if (nullAnnotation != null) {
    w.println(", new NullValidator(\"%s\")", nullAnnotation.message());
  }
}

代码示例来源:origin: sixt/ja-micro

@Null
private final Tracer tracer;
@Null
private final MetricBuilderFactory metricsBuilderFactory;

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

private void appendNullValidator(SourceWriter w, JField field) {
  Null nullAnnotation = field.getAnnotation(Null.class);
  if (nullAnnotation != null) {
    w.println(", new NullValidator(\"%s\")", nullAnnotation.message());
  }
}

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

@Null
private String value1 = null;

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

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

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

class NullDummyEntity {
  @Null
  Object property;
  public Object getProperty() {
    return property;
  }
  public void setProperty(Object property) {
    this.property = property;
  }
}

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

private static class NullDummyEntity {
  @Null
  private Object property;
  public void setProperty(Object property) {
    this.property = property;
  }
}

代码示例来源:origin: apache/apex-malhar

/**
 * @param column   Name of column value to be negated.
 */
public NegateExpression(@Null String column, String alias)
{
 super(column, alias);
 if (this.alias == null) {
  this.alias = "NEGATE(" + column + ")";
 }
}

代码示例来源:origin: org.apache.apex/malhar-contrib

/**
 * @param column   Name of column value to be negated.
 */
public NegateExpression(@Null String column, String alias)
{
 super(column, alias);
 if (this.alias == null) {
  this.alias = "NEGATE(" + column + ")";
 }
}

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

private class WrapperWithDisabledUnwrapping {
  @Null(payload = { Unwrapping.Skip.class })
  private final Wrapper<Integer> integerWrapper = new Wrapper<>( 5 );
}

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

private class EntityWithNoUnwrapping {
  @Null
  private final ValueHolder<Integer> integerHolder = new ValueHolder<>( 5 );
}

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

private class IntegerWrapperWithDisabledUnwrapping {
  @Null(payload = { Unwrapping.Skip.class })
  private final IntegerWrapper integerWrapper = new IntegerWrapper( 5 );
}

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

@Null
@NotBlank
@Target(ElementType.FIELD)

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

@Null(message="The value should be null.")
private String nullField;

代码示例来源:origin: tst-labs/esocial

@Null
private byte indSubstPatrObra;

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

@DecimalMin("10001")
@Null(groups = IgnoredValidationGroup.class)
public String placeBooking(@Size(min = 5) @Null(groups = IgnoredValidationGroup.class) String name) {
  invocationCount++;
  return name;
}

代码示例来源:origin: syhily/gossip

@Data
@Accessors(chain = true)
public abstract class Pagination {
  private static final long serialVersionUID = -2494442769959590624L;

  // The number to show in each page
  @Min(value = 1, message = "Page size should be bigger than 1")
  private Integer pageSize;

  // The query page
  @Min(value = 1, message = "Page num should be positive value")
  private Integer currentPage;

  // The total count multiply page size, only act as a response
  @Null(message = "Argument [totalPage] is not valid")
  private Integer totalPage;
}

相关文章