org.zeroexchange.collaboration.contract.read
Class DAOContractReader

java.lang.Object
  extended by org.zeroexchange.collaboration.contract.read.DAOContractReader
All Implemented Interfaces:
ContractReader

@FeatureMarker(value="collaboration")
public class DAOContractReader
extends Object
implements ContractReader

The default implementation of the contracts management service.

Author:
black

Constructor Summary
DAOContractReader()
           
 
Method Summary
 Collection<User> getAllAcceptedUsers(Contract contract)
          Returns all the users of the contract.
 SlicingDataSet<Contract> getAvailableContracts(SortDescriptor sortDescriptor, ContractFilter filter, User viewer)
          Returns data set with available contracts.
 Contract getContract(Integer contractId)
          Returns the contract by its Id.
 long getUserContractsNumber(User user)
          Returns the number of contracts where the specified user is a participant.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DAOContractReader

public DAOContractReader()
Method Detail

getAvailableContracts

public SlicingDataSet<Contract> getAvailableContracts(SortDescriptor sortDescriptor,
                                                      ContractFilter filter,
                                                      User viewer)
Returns data set with available contracts.

Specified by:
getAvailableContracts in interface ContractReader
viewer - TODO

getContract

public Contract getContract(Integer contractId)
                     throws BusinessLogicException
Description copied from interface: ContractReader
Returns the contract by its Id.

Specified by:
getContract in interface ContractReader
Throws:
BusinessLogicException

getAllAcceptedUsers

public Collection<User> getAllAcceptedUsers(Contract contract)
Returns all the users of the contract.

Specified by:
getAllAcceptedUsers in interface ContractReader

getUserContractsNumber

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

Specified by:
getUserContractsNumber in interface ContractReader


Copyright © 2013. All Rights Reserved.