public class P2PGridBasisResourceDao extends Object implements DataDao, ResourceDao
Constructor and Description |
---|
P2PGridBasisResourceDao(ResourceDao dao,
DaoContext context)
The constructor.
|
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 userGridId,
String userId) |
void |
removeEntityListener() |
ResourceSearchResult |
searchResources(int startIndex,
int maxCount,
String resourceGridId,
MatchingCondition[] conditions,
Order[] orders) |
void |
setEntityListener() |
boolean |
updateDataSource(Data data) |
boolean |
updateDataTarget(Data data) |
public P2PGridBasisResourceDao(ResourceDao dao, DaoContext context)
dao
- public void setEntityListener()
setEntityListener
in interface DataDao
public void removeEntityListener()
removeEntityListener
in interface DataDao
public boolean updateDataSource(Data data) throws DataDaoException, UnmatchedDataTypeException
updateDataSource
in interface DataDao
DataDaoException
UnmatchedDataTypeException
public boolean updateDataTarget(Data data) throws DataDaoException, UnmatchedDataTypeException
updateDataTarget
in interface DataDao
DataDaoException
UnmatchedDataTypeException
public void addResource(Resource resource) throws DaoException, ResourceAlreadyExistsException
addResource
in interface ResourceDao
DaoException
ResourceAlreadyExistsException
public void clear() throws DaoException
clear
in interface ResourceDao
DaoException
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
public List<Resource> listAllResources(String resourceGridId) throws DaoException
listAllResources
in interface ResourceDao
DaoException
public List<Resource> listResourcesOfUser(String userGridId, 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