コード例 #1
0
 public Resource marshallIds(Class clazz, Object id) {
   ResourceMapping resourceMapping = mapping.getRootMappingByClass(clazz);
   if (resourceMapping == null) {
     return null;
   }
   return marshallIds(resourceMapping, id);
 }
コード例 #2
0
 public Resource marshall(Object root) {
   if (root instanceof AliasedObject) {
     return marshall(((AliasedObject) root).getAlias(), root);
   }
   ResourceMapping resourceMapping = mapping.getRootMappingByClass(root.getClass());
   if (resourceMapping == null) {
     return null;
   }
   Resource resource = resourceFactory.createResource(resourceMapping.getAlias());
   resourceMapping.getConverter().marshall(resource, root, resourceMapping, createContext());
   return resource;
 }