org.sciplore.resources
Class User
java.lang.Object
org.sciplore.resources.Resource
org.sciplore.resources.User
@Entity
public class User
- extends Resource
Methods inherited from class org.sciplore.resources.Resource |
save |
USER_TYPE_ADMIN
public static final Short USER_TYPE_ADMIN
USER_TYPE_NORMAL
public static final Short USER_TYPE_NORMAL
USER_TYPE_ANONYMOUS
public static final Short USER_TYPE_ANONYMOUS
User
public User()
User
public User(String username)
User
public User(String username,
String password)
- Constructur
- Parameters:
username
- password
-
crypt
public static String crypt(String password)
getUser
public static User getUser(String username)
isValidUser
public boolean isValidUser()
- Checks if user data is correct
- Parameters:
username
- password
-
- Returns:
checkCredentials
public boolean checkCredentials(String password)
createUserinDB
public int createUserinDB()
- Creates a new user in the database
- Returns:
getId
public Integer getId()
- Returns:
- the id
setId
public void setId(Integer id)
- Parameters:
id
- the id to set
getPerson
public Person getPerson()
- Returns:
- the person
setPerson
public void setPerson(Person person)
- Parameters:
person
- the person to set
getUsername
public String getUsername()
- Returns:
- the username
setUsername
public void setUsername(String username)
- Parameters:
username
- the username to set
getPassword
public String getPassword()
- Returns:
- the password
setPassword
public void setPassword(String password)
- Parameters:
password
- the password to set
setPassword
public void setPassword(String password,
Boolean crypt)
getType
public Short getType()
- Returns:
- the type
setType
public void setType(Short type)
- Parameters:
type
- the type to set
getLang
public String getLang()
- Returns:
- the lang
setLang
public void setLang(String lang)
- Parameters:
lang
- the lang to set
getValid
public Short getValid()
- Returns:
- the valid
setValid
public void setValid(Short valid)
- Parameters:
valid
- the valid to set
getRemark
public String getRemark()
- Returns:
- the remark
setRemark
public void setRemark(String remark)
- Parameters:
remark
- the remark to set
getRegistrationdate
public Date getRegistrationdate()
- Returns:
- the registrationdate
setRegistrationdate
public void setRegistrationdate(Date registrationdate)
- Parameters:
registrationdate
- the registrationdate to set
getAlterts
public Set<Alert> getAlterts()
- Returns:
- the alterts
setAlterts
public void setAlterts(Set<Alert> alterts)
- Parameters:
alterts
- the alterts to set
getFeedbacks
public Set<Feedback> getFeedbacks()
- Returns:
- the feedbacks
setFeedbacks
public void setFeedbacks(Set<Feedback> feedbacks)
- Parameters:
feedbacks
- the feedbacks to set
getMindmaps
public Set<Mindmap> getMindmaps()
- Returns:
- the mindmaps
setMindmaps
public void setMindmaps(Set<Mindmap> mindmaps)
- Parameters:
mindmaps
- the mindmaps to set
getNewsletters
public Set<Newsletter> getNewsletters()
- Returns:
- the newsletters
setNewsletters
public void setNewsletters(Set<Newsletter> newsletters)
- Parameters:
newsletters
- the newsletters to set
sync
public static User sync(User user)