org.zeroexchange.dao.resource
Class ResourceDAOImpl

java.lang.Object
  extended by org.zeroexchange.dao.HibernateSessionHolder
      extended by org.zeroexchange.dao.BaseHibernateDAO<Integer,T>
          extended by org.zeroexchange.dao.BaseIntegerPKDAO<Resource>
              extended by org.zeroexchange.dao.resource.ResourceDAOImpl
All Implemented Interfaces:
DAO<Integer,Resource>, IntegerPKDAO<Resource>, ResourceDAO

public class ResourceDAOImpl
extends BaseIntegerPKDAO<Resource>
implements ResourceDAO

Implementation of the resource DAO.

Author:
black

Constructor Summary
ResourceDAOImpl()
           
 
Method Summary
 ProcessorAwareDataSet<Resource> getContractResources(Integer contractId)
          Returns contract's resources.
 Class<Resource> getEntityClass()
          
 ProcessorAwareDataSet<Resource> getUserRelatedResources(int userId)
          Return resources where the current user is the participant.
 Collection<Resource> getUserResources(int userId, Set<Integer> resourcesIds)
          Return resources belonging to the current user by the resources ids.
 
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
 

Constructor Detail

ResourceDAOImpl

public ResourceDAOImpl()
Method Detail

getEntityClass

public Class<Resource> getEntityClass()

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

getUserRelatedResources

public ProcessorAwareDataSet<Resource> getUserRelatedResources(int userId)
Return resources where the current user is the participant.

Specified by:
getUserRelatedResources in interface ResourceDAO

getUserResources

public Collection<Resource> getUserResources(int userId,
                                             Set<Integer> resourcesIds)
Return resources belonging to the current user by the resources ids.

Specified by:
getUserResources in interface ResourceDAO

getContractResources

public ProcessorAwareDataSet<Resource> getContractResources(Integer contractId)
Description copied from interface: ResourceDAO
Returns contract's resources.

Specified by:
getContractResources in interface ResourceDAO


Copyright © 2013. All Rights Reserved.