本文整理了Java中javax.validation.constraints.NotNull.<init>()
方法的一些代码示例,展示了NotNull.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NotNull.<init>()
方法的具体详情如下:
包路径:javax.validation.constraints.NotNull
类名称:NotNull
方法名:<init>
暂无
代码示例来源:origin: prestodb/presto
@NotNull
@Size(min = 1)
public List<ServerAddress> getSeeds()
{
return seeds;
}
代码示例来源:origin: apache/incubator-druid
/**
*/
public class ConfigManagerConfig
{
@JsonProperty
@NotNull
private Period pollDuration = new Period("PT1M");
public Period getPollDuration()
{
return pollDuration;
}
}
代码示例来源:origin: Graylog2/graylog2-server
@JsonProperty("node_name")
@NotNull
@Size(min = 1)
public abstract String nodeName();
代码示例来源:origin: fabric8io/kubernetes-client
@JsonInclude(JsonInclude.Include.NON_NULL)
@Generated("org.jsonschema2pojo")
@JsonPropertyOrder({
"apiVersion",
"kind",
@NotNull
@JsonProperty("apiVersion")
private String apiVersion = "admission.k8s.io/v1beta1";
@NotNull
@JsonProperty("kind")
private String kind = "AdmissionReview";
@JsonProperty("request")
@Valid
private AdmissionRequest request;
@JsonProperty("response")
@Valid
private AdmissionResponse response;
@JsonIgnore
代码示例来源:origin: netgloo/spring-boot-samples
@Entity
@Table(name="users")
public class User {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private long id;
@NotNull
@Size(min = 3, max = 80)
private String email;
@NotNull
@Size(min = 2, max = 80)
private String name;
代码示例来源:origin: signalapp/Signal-Server
public class MessageCacheConfiguration {
@JsonProperty
@NotNull
@Valid
private RedisConfiguration redis;
@JsonProperty
private int persistDelayMinutes = 10;
public RedisConfiguration getRedisConfiguration() {
return redis;
}
public int getPersistDelayMinutes() {
return persistDelayMinutes;
}
}
代码示例来源:origin: hibernate/hibernate-orm
@Entity
public class C {
@GeneratedValue(strategy = GenerationType.AUTO)
@Id
Long id;
@NotNull
String name;
代码示例来源:origin: szerhusenBC/jwt-spring-security-demo
@Entity
@Table(name = "AUTHORITY")
public class Authority {
@NotNull
@Enumerated(EnumType.STRING)
private AuthorityName name;
代码示例来源:origin: prontera/spring-cloud-rest-tcc
/**
* @author Zhao Junjian
*/
@Getter
@Setter
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler", "fieldHandler"}, ignoreUnknown = true)
public class LoginRequest extends RestfulRequest {
private static final long serialVersionUID = -3286520204644035655L;
@NotNull
@NotBlank
@Pattern(regexp = "^\\d{11}$", message = "请输入11位手机号")
@JsonProperty("mobile")
@ApiModelProperty(value = "手机号", example = "18888888888", required = true)
private String mobile;
@NotNull
@Size(min = 6, max = 20, message = "请输入6~20位的密码")
@JsonProperty("login_pwd")
@ApiModelProperty(value = "登录与支付密码", example = "123123123", required = true)
private String loginPwd;
}
代码示例来源:origin: prontera/spring-cloud-rest-tcc
/**
* @author Zhao Junjian
*/
@Getter
@Setter
@AllArgsConstructor
@ToString
@EqualsAndHashCode
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler", "fieldHandler"}, ignoreUnknown = true)
public class TccRequest implements Serializable {
private static final long serialVersionUID = 1847362921754190531L;
@Valid
@NotNull
@Size(min = 1)
@ApiModelProperty(value = "参与方提供的链接集合", required = true)
private List<Participant> participantLinks;
}
代码示例来源:origin: joelittlejohn/jsonschema2pojo
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"post_office_box",
"extended_address",
public class Address {
@NotNull
@JsonProperty("locality")
private String locality;
@NotNull
@JsonProperty("region")
private String region;
@NotNull
@JsonProperty("country_name")
private String countryName;
@JsonProperty("address")
@Valid
private List<Object> address = new ArrayList<Object>();
@JsonIgnore
@Valid
private Map<String, Object> additionalProperties = new HashMap<String, Object>();
代码示例来源:origin: spring-projects/spring-framework
public class BeanWithMapEntryConstraint {
@Valid
private Map<@NotNull String, @NotNull String> property;
public Map<String, String> getProperty() {
return property;
}
public void setProperty(Map<String, String> property) {
this.property = property;
}
}
代码示例来源:origin: cloudfoundry/uaa
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public class IdentityZone {
@NotNull
private String subdomain;
@NotNull
private String name;
@JsonProperty("last_modified")
private Date lastModified = new Date();
代码示例来源:origin: torodb/stampede
@Description("config.pool")
@JsonPropertyOrder({"connectionPoolTimeout", "connectionPoolSize"})
public class Pool implements ConnectionPoolConfig {
@NotNull
@JsonProperty(required = true)
private Long connectionPoolTimeout = 10L * 1000;
@Description("config.generic.connectionPoolSize")
@NotNull
@Min(20)
@JsonProperty(required = true)
private Integer connectionPoolSize = 30;
@NotNull
@Min(1)
@JsonIgnore
代码示例来源:origin: OAuth-Apis/apis
@Entity
@Table(name="resourceserver", uniqueConstraints =
@UniqueConstraint(columnNames = {"owner", "resourceServerName"})
@NotNull
private String name;
@NotNull
private String key;
@NotNull
private List<String> scopes = new ArrayList<String>();
@NotNull
private String secret;
@NotNull
private String contactName;
@OneToMany(fetch = FetchType.EAGER, cascade = {CascadeType.ALL}, orphanRemoval = true)
@JoinColumn(name = "resourceserver_id", nullable = false)
@Valid
private Set<Client> clients;
代码示例来源:origin: hibernate/hibernate-orm
/**
* @author Emmanuel Bernard
*/
@Entity
public class Rock extends Music {
@NotNull
public Integer bit;
}
代码示例来源:origin: Netflix/conductor
/**
*
* @param workflowDefList Workflow definitions to be updated.
*/
void updateWorkflowDef(@NotNull(message = "WorkflowDef list name cannot be null or empty")
@Size(min=1, message = "WorkflowDefList is empty")
List<@NotNull(message = "WorkflowDef cannot be null") @Valid WorkflowDef> workflowDefList);
代码示例来源:origin: fabric8io/kubernetes-client
@JsonInclude(JsonInclude.Include.NON_NULL)
@Generated("org.jsonschema2pojo")
@JsonPropertyOrder({
"apiVersion",
"kind",
@NotNull
@JsonProperty("apiVersion")
private String apiVersion = "v1";
@JsonProperty("items")
@Valid
private List<HasMetadata> items = new ArrayList<HasMetadata>();
@NotNull
@JsonProperty("kind")
private String kind = "List";
@JsonProperty("metadata")
@Valid
private ListMeta metadata;
@JsonIgnore
代码示例来源:origin: netgloo/spring-boot-samples
@Entity
@Table(name = "users")
public class User {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private long id;
@NotNull
private String email;
@NotNull
private String name;
代码示例来源:origin: graphhopper/graphhopper
public class GraphHopperServerConfiguration extends Configuration implements GraphHopperBundleConfiguration, AssetsBundleConfiguration {
@NotNull
@JsonProperty
private final CmdArgs graphhopper = new CmdArgs();
@Valid
@JsonProperty
private final AssetsConfiguration assets = AssetsConfiguration.builder().build();
public GraphHopperServerConfiguration() {
}
@Override
public CmdArgs getGraphHopperConfiguration() {
return graphhopper;
}
@Override
public AssetsConfiguration getAssetsConfiguration() {
return assets;
}
}
内容来源于网络,如有侵权,请联系作者删除!