2 Copyright 2009 senju@users.sourceforge.jp
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
8 http://www.apache.org/licenses/LICENSE-2.0
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
17 package jp.sourceforge.rabbitBTS.models;
19 import java.util.Date;
21 import javax.jdo.annotations.IdGeneratorStrategy;
22 import javax.jdo.annotations.IdentityType;
23 import javax.jdo.annotations.PersistenceCapable;
24 import javax.jdo.annotations.Persistent;
25 import javax.jdo.annotations.PrimaryKey;
27 import org.springmodules.validation.bean.conf.loader.annotation.handler.Email;
28 import org.springmodules.validation.bean.conf.loader.annotation.handler.Length;
29 import org.springmodules.validation.bean.conf.loader.annotation.handler.NotBlank;
30 import org.springmodules.validation.bean.conf.loader.annotation.handler.NotNull;
32 @PersistenceCapable(identityType = IdentityType.APPLICATION)
33 public class Account {
35 @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
36 private Long accountId;
39 * ユーザーのニックネーム。変更可能とする。
46 private String nickName;
49 * ユーザーのemail。googleアカウント使用時は変更不可とする。
64 // TODO:サロゲートありで満杯までいれると500byte越えるかもね。
72 private Date lastAccess;
78 private boolean admin;
80 public Long getAccountId() {
81 return this.accountId;
84 public Date getLastAccess() {
85 return this.lastAccess;
91 public String getBio() {
95 public void setLastAccess(Date lastAccess) {
96 this.lastAccess = lastAccess;
103 public void setBio(String bio) {
109 * the accountId to set
111 public void setAccountId(Long accountId) {
112 this.accountId = accountId;
116 * @return the nickName
118 public String getNickName() {
119 return this.nickName;
125 public String getEmail() {
131 * the nickName to set
133 public void setNickName(String nickName) {
134 this.nickName = nickName;
141 public void setEmail(String email) {
148 public boolean isAdmin() {
156 public void setAdmin(boolean isAdmin) {
157 this.admin = isAdmin;