@Override
 @Transactional(readOnly = true)
 public List<ResourceEntity> getParentResources(String resourceId, int from, int size) {
   final ResourceEntity example = new ResourceEntity();
   final ResourceEntity child = new ResourceEntity();
   child.setId(resourceId);
   example.addChildResource(child);
   return resourceDao.getByExample(example, from, size);
 }
 @Override
 @Transactional(readOnly = true)
 public int getNumOfParentResources(String resourceId) {
   final ResourceEntity example = new ResourceEntity();
   final ResourceEntity child = new ResourceEntity();
   child.setId(resourceId);
   example.addChildResource(child);
   return resourceDao.count(example);
 }
 @Override
 @Transactional(readOnly = true)
 public List<ResourceEntity> getChildResources(String resourceId, int from, int size) {
   final ResourceEntity example = new ResourceEntity();
   final ResourceEntity parent = new ResourceEntity();
   parent.setId(resourceId);
   example.addParentResource(parent);
   final List<ResourceEntity> resultList = resourceDao.getByExample(example, from, size);
   return resultList;
 }