cz.muni.fi.pclis.service.learningContracts
Class LearningContractServiceImpl

java.lang.Object
  extended by cz.muni.fi.pclis.service.learningContracts.LearningContractServiceImpl
All Implemented Interfaces:
LearningContractService

@Transactional
public class LearningContractServiceImpl
extends Object
implements LearningContractService

User: Ľuboš Pecho Date: 11.2.2010 Time: 9:31:40


Field Summary
private  ContractAdditionDao contractAdditionDao
           
private  GenericServiceImpl<LearningContract,LearningContractDao> imp
           
private  LearningContractsBehaviourService learningContractsBehaviourService
           
 
Constructor Summary
LearningContractServiceImpl()
           
 
Method Summary
 void acceptLearningContractAddition(long additionId)
           
 void addAdditionToContract(long contractId, ContractAddition contractAddition)
           
private  void assertUserForVote(User user, Course course, Term term)
           
 LearningContract create(LearningContract entity)
           
 List<LearningContract> getAll()
           
 List<LearningContract> getByCourseAndTerm(Course course, Term term)
           
 LearningContract getById(long id)
           
 LearningContractDao getDao()
           
 int getVotes(long contractId)
           
 int[] getVotesCountsByCourseAndTerm(Course course, Term term)
           
 LearningContract refresh(LearningContract entity)
           
 void remove(LearningContract entity)
           
 void removeById(long id)
           
 LearningContract searchById(long id)
           
 void setContractAdditionDao(ContractAdditionDao contractAdditionDao)
           
 void setDao(LearningContractDao learningContractDao)
           
 void setLearningContractsBehaviourService(LearningContractsBehaviourService learningContractsBehaviourService)
           
 LearningContract update(LearningContract entity)
           
 LearningContractDao useDao()
           
 void voteForContract(long contractId, User user)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

imp

private GenericServiceImpl<LearningContract,LearningContractDao> imp

learningContractsBehaviourService

private LearningContractsBehaviourService learningContractsBehaviourService

contractAdditionDao

private ContractAdditionDao contractAdditionDao
Constructor Detail

LearningContractServiceImpl

public LearningContractServiceImpl()
Method Detail

getById

public LearningContract getById(long id)
Specified by:
getById in interface LearningContractService

searchById

public LearningContract searchById(long id)
Specified by:
searchById in interface LearningContractService

getAll

public List<LearningContract> getAll()
Specified by:
getAll in interface LearningContractService

getByCourseAndTerm

public List<LearningContract> getByCourseAndTerm(Course course,
                                                 Term term)
Specified by:
getByCourseAndTerm in interface LearningContractService

getVotesCountsByCourseAndTerm

public int[] getVotesCountsByCourseAndTerm(Course course,
                                           Term term)
Specified by:
getVotesCountsByCourseAndTerm in interface LearningContractService

getVotes

public int getVotes(long contractId)
Specified by:
getVotes in interface LearningContractService

assertUserForVote

private void assertUserForVote(User user,
                               Course course,
                               Term term)

voteForContract

public void voteForContract(long contractId,
                            User user)
Specified by:
voteForContract in interface LearningContractService

addAdditionToContract

public void addAdditionToContract(long contractId,
                                  ContractAddition contractAddition)
Specified by:
addAdditionToContract in interface LearningContractService

acceptLearningContractAddition

public void acceptLearningContractAddition(long additionId)
Specified by:
acceptLearningContractAddition in interface LearningContractService

create

public LearningContract create(LearningContract entity)
Specified by:
create in interface LearningContractService

update

public LearningContract update(LearningContract entity)
Specified by:
update in interface LearningContractService

remove

public void remove(LearningContract entity)
Specified by:
remove in interface LearningContractService

removeById

public void removeById(long id)
Specified by:
removeById in interface LearningContractService

refresh

public LearningContract refresh(LearningContract entity)
Specified by:
refresh in interface LearningContractService

useDao

public LearningContractDao useDao()

getDao

public LearningContractDao getDao()

setDao

public void setDao(LearningContractDao learningContractDao)

setLearningContractsBehaviourService

public void setLearningContractsBehaviourService(LearningContractsBehaviourService learningContractsBehaviourService)

setContractAdditionDao

public void setContractAdditionDao(ContractAdditionDao contractAdditionDao)


Copyright © 2009-2010 Faculty of Informatics, Masaryk university, Brno. All Rights Reserved.