org.zeroexchange.dao.collaboration
Class ContractDAOImpl

java.lang.Object
  extended by org.zeroexchange.dao.HibernateSessionHolder
      extended by org.zeroexchange.dao.BaseHibernateDAO<Integer,T>
          extended by org.zeroexchange.dao.BaseIntegerPKDAO<Contract>
              extended by org.zeroexchange.dao.collaboration.ContractDAOImpl
All Implemented Interfaces:
ContractDAO, DAO<Integer,Contract>, IntegerPKDAO<Contract>

public class ContractDAOImpl
extends BaseIntegerPKDAO<Contract>
implements ContractDAO

The DAO manipulated with the contract objects.

Author:
black

Field Summary
protected static String EFFECTIVEUSERS_ALIAS
           
protected static String INVITATIONS_ALIAS
           
 
Constructor Summary
ContractDAOImpl()
           
 
Method Summary
 Collection<User> getAllAcceptedContractUsers(Integer contractId)
          Returns all accepted contract users.
 ProcessorAwareDataSet<Contract> getAvailableContracts(User viewer)
          Returns data set for iteration through the available contract.
 Class<Contract> getEntityClass()
          
 long getUserContractsNumber(Integer userId)
          Returns the number of contracts where the specified user is a participant.
 Collection<User> getUsers(Integer contractId)
          Returns all users which resources are registered in the contract.
 
Methods inherited from class org.zeroexchange.dao.BaseHibernateDAO
getById, removeById, save
 
Methods inherited from class org.zeroexchange.dao.HibernateSessionHolder
getSession
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.zeroexchange.dao.DAO
getById, removeById, save
 

Field Detail

INVITATIONS_ALIAS

protected static final String INVITATIONS_ALIAS
See Also:
Constant Field Values

EFFECTIVEUSERS_ALIAS

protected static final String EFFECTIVEUSERS_ALIAS
See Also:
Constant Field Values
Constructor Detail

ContractDAOImpl

public ContractDAOImpl()
Method Detail

getEntityClass

public Class<Contract> getEntityClass()

Specified by:
getEntityClass in class BaseHibernateDAO<Integer,Contract>

getAvailableContracts

public ProcessorAwareDataSet<Contract> getAvailableContracts(User viewer)
Returns data set for iteration through the available contract.

Specified by:
getAvailableContracts in interface ContractDAO
Parameters:
viewer - TODO

getUsers

public Collection<User> getUsers(Integer contractId)
Returns all users which resources are registered in the contract.

Specified by:
getUsers in interface ContractDAO

getAllAcceptedContractUsers

public Collection<User> getAllAcceptedContractUsers(Integer contractId)
Returns all accepted contract users.

Specified by:
getAllAcceptedContractUsers in interface ContractDAO

getUserContractsNumber

public long getUserContractsNumber(Integer userId)
Returns the number of contracts where the specified user is a participant.

Specified by:
getUserContractsNumber in interface ContractDAO


Copyright © 2013. All Rights Reserved.