com.j2biz.blogunity.pojo
Class User

java.lang.Object
  extended bycom.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

Field Summary
static int FEMALE
           
static int MALE
           
 
Constructor Summary
User()
           
User(String name, String password, String email, String firstname, String lastname)
           
 
Method Summary
 void addContributedBlog(Blog blog)
           
 void addFavoriteBlog(Blog blog)
           
 void addFoundedBlog(Blog blog)
           
 void addFriend(User friend)
           
 void addUserpic(Userpic pic)
           
 void addWaitingForAcceptanceBlog(Blog blog)
           
 boolean canPostToBlog(Blog blog)
          Returns true if this user can post new entries to requested blog.
 boolean containsAsFriend(User u)
          Returns true, if the given user is one of the friends of the user u .
 boolean containsUserpic(Userpic pic)
           
 boolean containsUserpicWithName(String name)
           
 boolean containsUserpicWithUrl(String url)
          Checks, if userpic with given url is already assigned to user.
 boolean getActivated()
           
 String getActivationCode()
           
 boolean getAdministrator()
           
 String getBio()
           
 String getBioRaw()
           
 Date getBirthday()
           
 Set getComments()
           
 Set getContributedBlogs()
           
 String getEmail()
           
 Set getFavoriteBlogs()
           
 String getFirstname()
           
 Set getFoundedBlogs()
           
 Set getFriends()
           
 String getHomepage()
           
 String getIcq()
           
 Long getId()
           
 String getJabber()
           
 Locale getLanguage()
           
 String getLastname()
           
 Date getLastUpdateTime()
           
 String getMsn()
           
 String getNickname()
           
 int getNumberOfCommunityBlogsFounded()
           
 int getNumberOfIndividualBlogsFounded()
           
 String getPassword()
           
 Date getRegisterTime()
           
 int getSex()
           
 Set getUserpics()
           
 UserSettings getUserSettings()
           
 Set getWaitingForAcceptanceBlogs()
           
 String getYahoo()
           
 boolean isActivated()
           
 boolean isAdministrator()
           
 boolean isContributor(Blog blog)
           
 boolean isFounder(Blog blog)
           
 void setActivated(boolean activated)
           
 void setActivationCode(String activationCode)
           
 void setAdministrator(boolean isAdministrator)
           
 void setBio(String bio)
           
 void setBioRaw(String bioRaw)
           
 void setBirthday(Date birthday)
           
 void setComments(Set comments)
           
 void setContributedBlogs(Set contributedBlogs)
           
 void setEmail(String email)
           
 void setFavoriteBlogs(Set favoriteBlogs)
           
 void setFirstname(String firstName)
           
 void setFoundedBlogs(Set foundedBlogs)
           
 void setFriends(Set friends)
           
 void setHomepage(String homepage)
           
 void setIcq(String icq)
           
 void setId(Long id)
           
 void setJabber(String jabber)
           
 void setLanguage(Locale language)
           
 void setLastname(String lastName)
           
 void setLastUpdateTime(Date lastUpdateTime)
           
 void setMsn(String msn)
           
 void setNickname(String name)
           
 void setPassword(String password)
           
 void setRegisterTime(Date regiterTime)
           
 void setSex(int sex)
           
 void setUserpics(Set userpics)
           
 void setUserSettings(UserSettings userSettings)
           
 void setWaitingForAcceptanceBlogs(Set waitingForAcceptanceBlogs)
           
 void setYahoo(String yahoo)
           
 void validate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MALE

public static final int MALE
See Also:
Constant Field Values

FEMALE

public static final int FEMALE
See Also:
Constant Field Values
Constructor Detail

User

public User()

User

public User(String name,
            String password,
            String email,
            String firstname,
            String lastname)
Method Detail

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:

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