public class HibernateResourceDao extends HibernateCRUDDao<Resource> implements ResourceDao
HibernateDao.DaoBlock, HibernateDao.DaoBlockR<R>
Constructor and Description |
---|
HibernateResourceDao(HibernateDaoContext context) |
Modifier and Type | Method and Description |
---|---|
void |
addResource(Resource resource) |
void |
clear() |
void |
deleteResource(String resourceGridId,
String resourceId) |
void |
deleteResourcesOfGrid(String gridId) |
void |
deleteResourcesOfUser(String userGridId,
String userId) |
Resource |
getResource(String resourceGridId,
String resourceId) |
boolean |
isResourceExist(String resourceGridId,
String resourceId) |
List<Resource> |
listAllResources(String resourceGridId) |
List<Resource> |
listResourcesOfUser(String resourceGridId,
String userId) |
ResourceSearchResult |
searchResources(int startIndex,
int maxCount,
String resourceGridId,
MatchingCondition[] conditions,
Order[] orders) |
add, add, clearEach, createCriteria, createDeleteQuery, delete, delete, exists, get, getOrNull, list, update
createDeleteQuery, createDeleteQuery, deleteEntities, getContext, getSession, logAdditionalInfo, logWhenRollbacking, transact, transact
public HibernateResourceDao(HibernateDaoContext context)
public void clear() throws DaoException
clear
in interface ResourceDao
clear
in class HibernateCRUDDao<Resource>
DaoException
public List<Resource> listAllResources(String resourceGridId) throws DaoException
listAllResources
in interface ResourceDao
DaoException
public List<Resource> listResourcesOfUser(String resourceGridId, String userId) throws DaoException
listResourcesOfUser
in interface ResourceDao
DaoException
public ResourceSearchResult searchResources(int startIndex, int maxCount, String resourceGridId, MatchingCondition[] conditions, Order[] orders) throws DaoException
searchResources
in interface ResourceDao
DaoException
public void addResource(Resource resource) throws DaoException, ResourceAlreadyExistsException
addResource
in interface ResourceDao
DaoException
ResourceAlreadyExistsException
public void deleteResource(String resourceGridId, String resourceId) throws ResourceNotFoundException, DaoException
deleteResource
in interface ResourceDao
ResourceNotFoundException
DaoException
public void deleteResourcesOfGrid(String gridId) throws DaoException
deleteResourcesOfGrid
in interface ResourceDao
DaoException
public void deleteResourcesOfUser(String userGridId, String userId) throws DaoException
deleteResourcesOfUser
in interface ResourceDao
DaoException
public Resource getResource(String resourceGridId, String resourceId) throws ResourceNotFoundException, DaoException
getResource
in interface ResourceDao
ResourceNotFoundException
DaoException
public boolean isResourceExist(String resourceGridId, String resourceId) throws DaoException
isResourceExist
in interface ResourceDao
DaoException