1 // vim:set ts=4 sts=4 sw=4 noet fenc=utf-8:
3 Copyright 2009 senju@users.sourceforge.jp
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
9 http://www.apache.org/licenses/LICENSE-2.0
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
18 package jp.sourceforge.rabbitBTS.models;
20 import java.util.Date;
22 import javax.jdo.annotations.IdGeneratorStrategy;
23 import javax.jdo.annotations.IdentityType;
24 import javax.jdo.annotations.PersistenceCapable;
25 import javax.jdo.annotations.Persistent;
26 import javax.jdo.annotations.PrimaryKey;
28 import org.springmodules.validation.bean.conf.loader.annotation.handler.Email;
29 import org.springmodules.validation.bean.conf.loader.annotation.handler.Length;
30 import org.springmodules.validation.bean.conf.loader.annotation.handler.NotBlank;
31 import org.springmodules.validation.bean.conf.loader.annotation.handler.NotNull;
33 @PersistenceCapable(identityType = IdentityType.APPLICATION)
34 public class Account {
36 @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
37 private Long accountId;
40 * ユーザーのニックネーム。変更可能とする。
47 private String nickName;
50 * ユーザーのemail。googleアカウント使用時は変更不可とする。
65 // TODO:サロゲートありで満杯までいれると500byte越えるかもね。
73 private Date lastAccess;
79 private boolean admin;
81 public Long getAccountId() {
82 return this.accountId;
85 public Date getLastAccess() {
86 return this.lastAccess;
92 public String getBio() {
96 public void setLastAccess(Date lastAccess) {
97 this.lastAccess = lastAccess;
104 public void setBio(String bio) {
110 * the accountId to set
112 public void setAccountId(Long accountId) {
113 this.accountId = accountId;
117 * @return the nickName
119 public String getNickName() {
120 return this.nickName;
126 public String getEmail() {
132 * the nickName to set
134 public void setNickName(String nickName) {
135 this.nickName = nickName;
142 public void setEmail(String email) {
149 public boolean isAdmin() {
157 public void setAdmin(boolean isAdmin) {
158 this.admin = isAdmin;