javax.validation.constraints.Size.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(141)

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

Size.<init>介绍

暂无

代码示例

代码示例来源:origin: prestodb/presto

@NotNull
@Size(min = 1)
public List<ServerAddress> getSeeds()
{
  return seeds;
}

代码示例来源: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: Impetus/Kundera

@Embeddable
public class PhoneDirectory
  @Column
  private String phoneDirectoryName;
  @Column
  private List<String> contactName;
  @Column
  @Size(message = "The size should be at least equal to one but not more than 2", min = 1, max = 2)
  private Map<String, String> contactMap;

代码示例来源:origin: com.blazebit/blaze-weblink-core-model

@NotNull
@Column(length = RdbmsConstants.NAME_MAX_LENGTH, nullable = false)
@Size(min = 1, max = RdbmsConstants.NAME_MAX_LENGTH)
@Pattern(regexp = "[^/]*", message = "The slash character is not allowed")
public String getName() {
  return name;
}

代码示例来源:origin: dzinot/spring-boot-oauth2-jwt

/**
 * 
 * <h2>Permission</h2>
 * 
 * @author Kristijan Georgiev
 * 
 *         Permission entity
 *
 */

@Entity
@Setter
@Getter
@NoArgsConstructor
public class Permission extends BaseIdEntity {

  private static final long serialVersionUID = 1L;

  @NotNull
  @Size(min = 1, max = 60)
  private String name;

}

代码示例来源:origin: in28minutes/spring-boot-examples

@Entity
@ApiModel(description="All details about the student. ")
public class Student {
  @Id
  @GeneratedValue
  private Long id;
  @Size(min=2, message="Name should have atleast 2 characters")
  private String name;

代码示例来源:origin: denimgroup/threadfix

@Entity
@Table(name = "WafRuleDirective")
public class WafRuleDirective extends BaseEntity {
  @Size(max = 256, message = "{errors.maxlength}")
  private String directive;

代码示例来源:origin: com.blazebit/blaze-weblink-core-model

@Id
@Override
@Column(length = RdbmsConstants.NAME_MAX_LENGTH)
@Size(min = 1, max = RdbmsConstants.NAME_MAX_LENGTH)
@Pattern(regexp = "[^/]*", message = "The slash character is not allowed")
public String getId() {
  return id();
}

代码示例来源:origin: LuoLiangDSGA/spring-learning

/**
 * @author luoliang
 * @date 2018/7/8
 */
@Entity
@Data
public class User {
  @Id
  @GeneratedValue
  private Integer id;

  @Size(min = 1, max = 32, message = "Minimum username length: 4 characters,the maximum 32 characters ")
  @Column(unique = true, nullable = false)
  private String username;

  @Size(min = 6, message = "Minimum password length: 8 characters")
  @Column(nullable = false)
  private String password;

  @ElementCollection(fetch = FetchType.EAGER)
  private List<Role> roles;
}

代码示例来源:origin: zanata/zanata-platform

@NotEmpty
@Size(min = 32, max = 32)
@Id
public String getKeyHash() {
  return keyHash;
}

代码示例来源:origin: javaee-samples/javaee7-samples

@Entity
@Table(name = "CHUNK_CSV_DATABASE")
@XmlRootElement
@NamedQueries({
  @NamedQuery(name = "Person.findAll", query = "SELECT c FROM Person c"),
  @NamedQuery(name = "Person.findByName", query = "SELECT c FROM Person c WHERE c.name = :name"),
  @NotNull
  @Size(min = 1, max = 50)
  @Column(name = "NAME")
  private String name;
  @NotNull
  @Size(min = 1, max = 50)
  @Column(name = "hiredate")
  private String hiredate;

代码示例来源:origin: com.blazebit/blaze-weblink-core-model

@NotNull
@Column(length = RdbmsConstants.NAME_MAX_LENGTH)
@Size(min = 1, max = RdbmsConstants.NAME_MAX_LENGTH)
@Pattern(regexp = "[^/]*", message = "The slash character is not allowed")
public String getName() {
  return name;
}

代码示例来源:origin: prestodb/presto

@NotNull
@Size(min = 1)
public List<String> getContactPoints()
{
  return contactPoints;
}

代码示例来源:origin: org.openurp.edu.program/openurp-edu-program-api4j

@Entity(name = "org.openurp.edu.program.plan.model.MajorPlanComment")
public class MajorPlanComment extends NumberIdTimeObject<Long> {
 private static final long serialVersionUID = 1L;
 @NotNull
 @Size(max = 200)
 private String reason;

代码示例来源:origin: xautlx/s2jh4net

@Getter
@Setter
@Access(AccessType.FIELD)
@Entity
@Table(name = "auth_Department")
@MetaData(value = "部门")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
  @Size(min = 3)
  @Column(nullable = false, length = 255, unique = true)
  private String code;

代码示例来源:origin: org.openurp.code/openurp-code-edu4j

/**
 * 上下午时段
 *
 * @author xinzhou
 * @see
 */
@Entity(name = "org.openurp.code.edu.model.DayPart")
@Cacheable
@Cache(region = "eams.base", usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@industry
public class DayPart extends Code<Integer> {

 private static final long serialVersionUID = 2859213875873154722L;

 @Size(max = 20)
 private String color;

 public String getColor() {
  return color;
 }

 public void setColor(String color) {
  this.color = color;
 }

}

代码示例来源:origin: com.blazebit/blaze-weblink-core-model

@Id
@Size(min = 1, max = 256)
@Pattern(regexp = "[^/]*", message = "The slash character is not allowed")
@Override
public String getId() {
  return id();
}

代码示例来源:origin: OpenNMS/opennms

@Column(name="friendlyname", nullable = true)
@Size(min = 0, max = 30)
public String getFriendlyName() {
  return m_friendlyName;
}

代码示例来源:origin: szerhusenBC/jwt-spring-security-demo

@Column(name = "USERNAME", length = 50, unique = true)
@NotNull
@Size(min = 4, max = 50)
private String username;
@Column(name = "PASSWORD", length = 100)
@NotNull
@Size(min = 4, max = 100)
private String password;
@Column(name = "FIRSTNAME", length = 50)
@NotNull
@Size(min = 4, max = 50)
private String firstname;
@Column(name = "LASTNAME", length = 50)
@NotNull
@Size(min = 4, max = 50)
private String lastname;
@Column(name = "EMAIL", length = 50)
@NotNull
@Size(min = 4, max = 50)
private String email;

代码示例来源:origin: sk.seges.corpis/corpis-core-domain-jpa

@Column
@NotNull(groups = PersonCustomerFormCheck.class)
@Size(min = 1, max = DBConstraints.PERSON_LENGTH, groups = PersonCustomerFormCheck.class)
public String getSurname() {
  return super.getSurname();
}

相关文章