|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.muni.fi.pclis.commons.domain.DomainObject
cz.muni.fi.pclis.domain.learningContracts.LearningContract
public class LearningContract
Entity representing Learning Contract User: Ľuboš Pecho Date: 9.2.2010 Time: 20:16:33
Field Summary | |
---|---|
private Set<ContractAddition> |
additions
Addition added to this contract |
private User |
author
Author of the contract |
private Course |
course
Course in which the contract was created |
private String |
description
Description of the contract |
private Term |
term
Term in which the contract was created |
private String |
title
Title of the contract |
private Set<UserVote> |
userVotes
Users who voted for this contract |
Constructor Summary | |
---|---|
LearningContract()
|
Method Summary | |
---|---|
void |
addAddition(ContractAddition addition)
Add an addition |
void |
addUserVote(User user)
Add user who voted for this contract |
int |
compareTo(LearningContract o)
Compares this contract according to count of user votes and the id |
Set<ContractAddition> |
getAdditions()
|
int |
getAdditionsCount()
Returns count of additinos |
User |
getAuthor()
|
Course |
getCourse()
|
String |
getDescription()
|
private UserVote |
getOldestUserVote(User user)
|
Date |
getOldestVoteDate(User user)
Returns oldest vote date for user |
Term |
getTerm()
|
String |
getTitle()
|
Set<UserVote> |
getUserVotes()
|
int |
getUserVotesCount(User user)
Returns count votes of given user |
void |
removeOldestVote(User user)
Removes oldes vote for user |
void |
setAdditions(Set<ContractAddition> additions)
Sets the contract additions |
void |
setAuthor(User author)
Sets the author |
void |
setCourse(Course course)
Sets the course |
void |
setDescription(String description)
Sets the description |
void |
setTerm(Term term)
Sets the term |
void |
setTitle(String title)
Sets the title |
void |
setUserVotes(Set<UserVote> userVotes)
|
Methods inherited from class cz.muni.fi.pclis.commons.domain.DomainObject |
---|
equals, getId, hashCode, setId |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private User author
private Course course
private Term term
private Set<UserVote> userVotes
private String title
private String description
private Set<ContractAddition> additions
Constructor Detail |
---|
public LearningContract()
Method Detail |
---|
public User getAuthor()
public void setAuthor(User author)
author
- public Course getCourse()
public void setCourse(Course course)
course
- public Term getTerm()
public void setTerm(Term term)
term
- public Set<UserVote> getUserVotes()
public void setUserVotes(Set<UserVote> userVotes)
public void addUserVote(User user)
user
- public int getUserVotesCount(User user)
user
-
public Date getOldestVoteDate(User user)
user
-
private UserVote getOldestUserVote(User user)
public void removeOldestVote(User user)
user
- public String getTitle()
public void setTitle(String title)
title
- public String getDescription()
public void setDescription(String description)
description
- public Set<ContractAddition> getAdditions()
public void setAdditions(Set<ContractAddition> additions)
additions
- public int getAdditionsCount()
public void addAddition(ContractAddition addition)
addition
- public int compareTo(LearningContract o)
compareTo
in interface Comparable<LearningContract>
o
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |