com.j2biz.blogunity.pojo
Class User
java.lang.Object
com.j2biz.blogunity.pojo.User
- All Implemented Interfaces:
- Serializable, Validatable
- public class User
- extends Object
- implements Validatable, Serializable
- Since:
- 0.1
- Author:
- michelson
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MALE
public static final int MALE
- See Also:
- Constant Field Values
FEMALE
public static final int FEMALE
- See Also:
- Constant Field Values
User
public User()
User
public User(String name,
String password,
String email,
String firstname,
String lastname)
getId
public Long getId()
- Returns:
- Returns the id.
setId
public void setId(Long id)
- Parameters:
id
- The id to set.
getUserSettings
public UserSettings getUserSettings()
- Returns:
setUserSettings
public void setUserSettings(UserSettings userSettings)
- Parameters:
userSettings
-
getLanguage
public Locale getLanguage()
- Returns:
- locale
setLanguage
public void setLanguage(Locale language)
- Parameters:
language
-
getComments
public Set getComments()
- Returns:
- Returns the comments.
setComments
public void setComments(Set comments)
- Parameters:
comments
- The comments to set.
getEmail
public String getEmail()
- Returns:
- string
setEmail
public void setEmail(String email)
- Parameters:
email
- The email to set.
getNickname
public String getNickname()
- Returns:
- string
setNickname
public void setNickname(String name)
- Parameters:
name
- The name to set.
getPassword
public String getPassword()
- Returns:
- Returns the password.
setPassword
public void setPassword(String password)
- Parameters:
password
- The password to set.
getUserpics
public Set getUserpics()
- Returns:
- Returns the userpics.
setUserpics
public void setUserpics(Set userpics)
- Parameters:
userpics
- The userpics to set.
addUserpic
public void addUserpic(Userpic pic)
containsUserpicWithUrl
public boolean containsUserpicWithUrl(String url)
- Checks, if userpic with given url is already assigned to user.
- Parameters:
url
-
- Returns:
containsUserpicWithName
public boolean containsUserpicWithName(String name)
containsUserpic
public boolean containsUserpic(Userpic pic)
getFriends
public Set getFriends()
- Returns:
- Returns the friends.
addFriend
public void addFriend(User friend)
setFriends
public void setFriends(Set friends)
- Parameters:
friends
- The friends to set.
getContributedBlogs
public Set getContributedBlogs()
- Returns:
- Returns the contributedBlogs.
addContributedBlog
public void addContributedBlog(Blog blog)
setContributedBlogs
public void setContributedBlogs(Set contributedBlogs)
- Parameters:
contributedBlogs
- The contributedBlogs to set.
getWaitingForAcceptanceBlogs
public Set getWaitingForAcceptanceBlogs()
- Returns:
- Returns the waitingForAcceptanceBlogs.
setWaitingForAcceptanceBlogs
public void setWaitingForAcceptanceBlogs(Set waitingForAcceptanceBlogs)
- Parameters:
waitingForAcceptanceBlogs
- The waitingForAcceptanceBlogs to set.
addWaitingForAcceptanceBlog
public void addWaitingForAcceptanceBlog(Blog blog)
getFoundedBlogs
public Set getFoundedBlogs()
- Returns:
- Returns the foundedBlogs.
getNumberOfIndividualBlogsFounded
public int getNumberOfIndividualBlogsFounded()
getNumberOfCommunityBlogsFounded
public int getNumberOfCommunityBlogsFounded()
setFoundedBlogs
public void setFoundedBlogs(Set foundedBlogs)
- Parameters:
foundedBlogs
- The foundedBlogs to set.
addFoundedBlog
public void addFoundedBlog(Blog blog)
getFavoriteBlogs
public Set getFavoriteBlogs()
- Returns:
- Returns the favoriteBlogs.
setFavoriteBlogs
public void setFavoriteBlogs(Set favoriteBlogs)
- Parameters:
favoriteBlogs
- The favoriteBlogs to set.
addFavoriteBlog
public void addFavoriteBlog(Blog blog)
getActivated
public boolean getActivated()
- Returns:
- Returns true if the user is activated.
isActivated
public boolean isActivated()
- Returns:
- Returns true if the user is activated.
setActivated
public void setActivated(boolean activated)
getActivationCode
public String getActivationCode()
- Returns:
- string
setActivationCode
public void setActivationCode(String activationCode)
- Parameters:
activationCode
-
getAdministrator
public boolean getAdministrator()
- Returns:
- Returns the isAdministrator.
isAdministrator
public boolean isAdministrator()
- Returns:
- Returns the isAdministrator.
setAdministrator
public void setAdministrator(boolean isAdministrator)
- Parameters:
isAdministrator
- The isAdministrator to set.
getBio
public String getBio()
- Returns:
- text
setBio
public void setBio(String bio)
- Parameters:
bio
- The bio to set.
getBioRaw
public String getBioRaw()
- Returns:
- Returns the bioRaw.
setBioRaw
public void setBioRaw(String bioRaw)
- Parameters:
bioRaw
- The bioRaw to set.
getFirstname
public String getFirstname()
- Returns:
- Returns the firstName.
setFirstname
public void setFirstname(String firstName)
- Parameters:
firstName
- The firstName to set.
getLastname
public String getLastname()
- Returns:
- Returns the lastName.
setLastname
public void setLastname(String lastName)
- Parameters:
lastName
- The lastName to set.
getRegisterTime
public Date getRegisterTime()
- Returns:
- Returns the registerTime.
setRegisterTime
public void setRegisterTime(Date regiterTime)
getHomepage
public String getHomepage()
- Returns:
- Returns the homepage.
setHomepage
public void setHomepage(String homepage)
- Parameters:
homepage
- The homepage to set.
getIcq
public String getIcq()
- Returns:
- Returns the icq.
setIcq
public void setIcq(String icq)
- Parameters:
icq
- The icq to set.
getJabber
public String getJabber()
- Returns:
- Returns the jabber.
setJabber
public void setJabber(String jabber)
- Parameters:
jabber
- The jabber to set.
getMsn
public String getMsn()
- Returns:
- Returns the msn.
setMsn
public void setMsn(String msn)
- Parameters:
msn
- The msn to set.
getYahoo
public String getYahoo()
- Returns:
- Returns the yahoo.
setYahoo
public void setYahoo(String yahoo)
- Parameters:
yahoo
- The yahoo to set.
getBirthday
public Date getBirthday()
- Returns:
- Returns the birthday.
setBirthday
public void setBirthday(Date birthday)
- Parameters:
birthday
- The birthday to set.
getLastUpdateTime
public Date getLastUpdateTime()
- Returns:
- Returns the lastUpdateTime.
getSex
public int getSex()
- Returns:
- Returns the sex.
setSex
public void setSex(int sex)
- Parameters:
sex
- The sex to set.
setLastUpdateTime
public void setLastUpdateTime(Date lastUpdateTime)
- Parameters:
lastUpdateTime
- The lastUpdateTime to set.
canPostToBlog
public boolean canPostToBlog(Blog blog)
- Returns true if this user can post new entries to requested blog. This is
true if:
- user is a blog founder;
- user is a blog countributor;
- user is a system administrator;
- Parameters:
blog
-
- Returns:
isContributor
public boolean isContributor(Blog blog)
- Parameters:
blog
-
- Returns:
isFounder
public boolean isFounder(Blog blog)
- Parameters:
blog
-
- Returns:
containsAsFriend
public boolean containsAsFriend(User u)
- Returns true, if the given user is one of the friends of the user u
. Otherwise returns false.
- Returns:
- true, if the given user is one of the friends of the user u
.
validate
public void validate()
throws ValidationFailure
- Specified by:
validate
in interface Validatable
- Throws:
ValidationFailure
Copyright (c)j2biz.com