📄 cardinfo.java
字号:
package com.x3408.card;
public class CardInfo {
private String ownerID;
private String employeeID;
private int cardID;
private String introduce;
private String name;
private char sex;
private String birthday;
private int age;
private String PostCode;
private String email;
private String mobile;
private String phone;
private String college;
private String department;
private String position;
private boolean holder;
public CardInfo() {
}
public CardInfo(String pOwnerID,String pEmployeeID, String pIntroduce, String pName,
String pSex, String pBirthday, String pPostCode, String pEmail,
String pMobile, String pPhone, String pCollege, String pDepartment,
String pPosition, String pHolder) {
this.setOwner(pOwnerID);
this.setEmployeeID(pEmployeeID);
this.setIntroduce(pIntroduce);
this.setName(pName);
this.setSex(pSex);
this.setBirthday(pBirthday);
this.setPostCode(pPostCode);
this.setEmail(pEmail);
this.setMobile(pMobile);
this.setPhone(pPhone);
this.setCollege(pCollege);
this.setDepartment(pDepartment);
this.setPosition(pPosition);
this.setHolder(pHolder);
}
public CardInfo(String pOwnerID,String pEmployeeID, String pCardID, String pIntroduce,
String pName, String pSex, String pBirthday, String pAge,
String pPostCode, String pEmail, String pMobile, String pPhone,
String pCollege, String pDepartment, String pPosition,
String pHolder) {
this(pOwnerID,pEmployeeID, pIntroduce, pName, pSex, pBirthday, pPostCode,
pEmail, pMobile, pPhone, pCollege, pDepartment, pPosition,
pHolder);
this.setCardID(pCardID);
this.setAge(pAge);
}
public CardInfo(String pOwnerID,String pEmployeeID, String pCardID, String pName,
String pSex, String pBirthday, String pAge, String pMobile,
String pPhone, String pDepartment, String pPosition, String pHolder) {
this(pEmployeeID, pName, pSex, pBirthday, pAge, pMobile, pPhone,
pDepartment, pPosition);
this.setOwner(pOwnerID);
this.setCardID(pCardID);
this.setHolder(pHolder);
}
public CardInfo(String pEmployeeID, String pName, String pSex,
String pBirthday, String pAge, String pMobile, String pPhone,
String pDepartment, String pPosition) {
this.setEmployeeID(pEmployeeID);
this.setName(pName);
this.setSex(pSex);
this.setBirthday(pBirthday);
this.setAge(pAge);
this.setMobile(pMobile);
this.setPhone(pPhone);
this.setDepartment(pDepartment);
this.setPosition(pPosition);
}
public boolean isValid() {
if ((this.introduce != null && this.introduce.length() > 100)
|| this.name == null || "".equals(this.name)
|| this.name.length() > 15
|| (this.PostCode != null && this.PostCode.length() > 10)
|| (this.email != null && this.email.length() > 35)
|| (this.mobile != null && this.mobile.length() > 15)
|| (this.phone != null && this.phone.length() > 15)
|| (this.college != null && this.college.length() > 10)
|| (this.department != null && this.department.length() > 10)
|| (this.position != null && this.position.length() > 6)
||(this.employeeID!=null&&this.employeeID.length()>6)) {
return false;
}
return true;
}
public String getOwnerID() {
return this.ownerID;
}
public String getEmployeeID() {
return this.employeeID;
}
public String getCardOwner() {
return this.employeeID;
}
public int getCardID() {
return this.cardID;
}
public String getIntroduce() {
return this.introduce;
}
public String getName() {
return this.name;
}
public String getSex() {
return String.valueOf(this.sex);
}
public String getBirthday() {
return this.birthday;
}
public int getAge() {
return this.age;
}
public String getPostCode() {
return this.PostCode;
}
public String getEmail() {
return this.email;
}
public String getMobile() {
return this.mobile;
}
public String getPhone() {
return this.phone;
}
public String getCollege() {
return this.college;
}
public String getDepartment() {
return this.department;
}
public String getPosition() {
return this.position;
}
public boolean getHolder() {
return holder;
}
public void setOwner(String pOwnerID) {
this.ownerID = this.propertyTrim(pOwnerID);
}
public void setEmployeeID(String pEmployeeID) {
this.employeeID = this.propertyTrim(pEmployeeID);
}
public void setCardID(String pCardID) {
this.cardID = pCardID == null || pCardID.equals("") ? 0 : Integer
.parseInt(pCardID.trim());
}
public void setIntroduce(String pIntroduce) {
this.introduce = this.propertyTrim(pIntroduce);
}
public void setName(String pName) {
this.name = this.propertyTrim(pName);
}
public void setSex(String pSex) {
this.sex = pSex == null ? null : pSex.trim().charAt(0);
}
public void setBirthday(String pBirthday) {
this.birthday = this.propertyTrim(pBirthday);
}
public void setAge(String pAge) {
this.age = Integer.parseInt(pAge.trim());
}
public void setAge(int pAge) {
this.age = pAge;
}
public void setPostCode(String pPostCode) {
this.PostCode = this.propertyTrim(pPostCode);
}
public void setEmail(String pEmail) {
this.email = this.propertyTrim(pEmail);
}
public void setMobile(String pMobile) {
this.mobile = this.propertyTrim(pMobile);
}
public void setPhone(String pPhone) {
this.phone = this.propertyTrim(pPhone);
}
public void setCollege(String pCollege) {
this.college = this.propertyTrim(pCollege);
}
public void setDepartment(String pDepartment) {
this.department = this.propertyTrim(pDepartment);
}
public void setPosition(String pPosition) {
this.position = this.propertyTrim(pPosition);
}
public void setHolder(String pHolder) {
this.holder = "1".equals(this.propertyTrim(pHolder)) ? true : false;
}
private String propertyTrim(String property) {
return property == null ? null : property.trim();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -