Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Document(collection = "Account")
- public class Account {
- @Id
- private String id;
- private String userName;
- private String passWord;
- private String phone;
- private String privilege;
- private boolean lock;
- private long count;
- private Date dateCreate;
- private Date dateModify;
- private Date lastAccess;
- private boolean active;
- public Account() {
- }
- public Account(String id, String userName,
- String passWord, String phone, String privilege,
- boolean lock, long count, Date dateCreate,
- Date dateModify, Date lastAccess, boolean active) {
- this.id = id;
- this.userName = userName;
- this.passWord = passWord;
- this.phone = phone;
- this.privilege = privilege;
- this.lock = lock;
- this.count = count;
- this.dateCreate = dateCreate;
- this.dateModify = dateModify;
- this.lastAccess = lastAccess;
- this.active = active;
- }
- private JSONObject parseToJSONObject() {
- JSONObject jsonObject = JSONFactoryUtil.createJSONObject();
- jsonObject.put("id", id);
- jsonObject.put("username", userName);
- jsonObject.put("password", passWord);
- jsonObject.put("phone", phone);
- jsonObject.put("privilege", privilege);
- jsonObject.put("lock", lock);
- jsonObject.put("count", count);
- jsonObject.put("dateCreate", dateCreate);
- jsonObject.put("dateModify", dateModify);
- jsonObject.put("lastAccess", lastAccess);
- jsonObject.put("active", active);
- return jsonObject;
- }
- public String toString() {
- JSONObject jsonObject = parseToJSONObject();
- return jsonObject.toString();
- }
- public String getId() {
- return id;
- }
- public void setId(String id) {
- this.id = id;
- }
- public String getUserName() {
- return userName;
- }
- public void setUserName(String userName) {
- this.userName = userName;
- }
- public String getPassWord() {
- return passWord;
- }
- public void setPassWord(String passWord) {
- this.passWord = passWord;
- }
- public String getPhone() {
- return phone;
- }
- public void setPhone(String phone) {
- this.phone = phone;
- }
- public String getPrivilege() {
- return privilege;
- }
- public void setPrivilege(String privilege) {
- this.privilege = privilege;
- }
- public boolean isLock() {
- return lock;
- }
- public void setLock(boolean lock) {
- this.lock = lock;
- }
- public long getCount() {
- return count;
- }
- public void setCount(long count) {
- this.count = count;
- }
- public Date getDateCreate() {
- return dateCreate;
- }
- public void setDateCreate(Date dateCreate) {
- this.dateCreate = dateCreate;
- }
- public Date getDateModify() {
- return dateModify;
- }
- public void setDateModify(Date dateModify) {
- this.dateModify = dateModify;
- }
- public Date getLastAccess() {
- return lastAccess;
- }
- public void setLastAccess(Date lassAccess) {
- this.lastAccess = lassAccess;
- }
- public boolean isActive() {
- return active;
- }
- public void setActive(boolean active) {
- this.active = active;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement