1 2 3 24 package com.geinuke.vo; 25 26 import java.io.Serializable ; 27 import java.util.Date ; 28 import java.util.GregorianCalendar ; 29 30 import com.geinuke.common.NukeRoleI; 31 import com.geinuke.common.UserI; 32 33 34 public class UserVO implements UserI,Serializable { 35 protected int id=UserI.ANONYMOUS_ID; 36 protected NukeRoleI role=null; 37 protected String defStyle=null; 38 protected String name=null; 39 protected String sName=null; 40 protected String fEmail=null; 41 protected String email=null; 42 protected String slogan=null; 43 protected String webUrl=null; 44 protected String uName=null; 45 protected String password=null; 46 protected String avatar=null; 47 protected long regDate=0; 48 49 52 public UserVO() { 53 super(); 54 this.role=new RoleVO(); 55 } 56 59 public String getDefStyle() { 60 return defStyle; 61 } 62 65 public void setDefStyle(String defStyle) { 66 this.defStyle = defStyle; 67 } 68 71 public int getId() { 72 return id; 73 } 74 77 public void setId(int id) { 78 this.id = id; 79 } 80 83 public NukeRoleI getRole() { 84 return role; 85 } 86 89 public void setRole(NukeRoleI role) { 90 this.role = role; 91 } 92 95 public String getName() { 96 return name; 97 } 98 101 public void setName(String name) { 102 this.name = name; 103 } 104 public String getUName() { 105 return uName; 106 } 107 public void setUName(String name) { 108 uName = name; 109 } 110 public String getPassword() { 111 return password; 112 } 113 public void setPassword(String password) { 114 this.password = password; 115 } 116 117 public boolean isAdmin() { 118 119 return this.getRole().getLevela()>=1000; 120 } 121 122 public boolean isMaster() { 123 124 return this.getRole().getLevela()>=10000; 125 } 126 public String getAvatar() { 127 return avatar; 128 } 129 public void setAvatar(String avatar) { 130 if(avatar!=null) 131 this.avatar = avatar; 132 } 133 public long getRegDate() { 134 return regDate; 135 } 136 137 public GregorianCalendar getRegDateTime() { 138 GregorianCalendar gc=null; 139 Date d=new Date (this.regDate); 140 gc=new GregorianCalendar (); 141 gc.setTime(d); 142 return gc; 143 } 144 145 146 public void setRegDate(long regDate) { 147 this.regDate = regDate; 148 } 149 152 public String getEmail() { 153 return email; 154 } 155 158 public void setEmail(String email) { 159 this.email = email; 160 } 161 164 public String getFEmail() { 165 return fEmail; 166 } 167 170 public void setFEmail(String email) { 171 fEmail = email; 172 } 173 176 public String getSlogan() { 177 return slogan; 178 } 179 182 public void setSlogan(String slogan) { 183 this.slogan = slogan; 184 } 185 188 public String getSName() { 189 return sName; 190 } 191 194 public void setSName(String name) { 195 sName = name; 196 } 197 200 public String getWebUrl() { 201 return webUrl; 202 } 203 206 public void setWebUrl(String webUrl) { 207 this.webUrl = webUrl; 208 } 209 } 210 | Popular Tags |