public Resource marshallIds(Class clazz, Object id) { ResourceMapping resourceMapping = mapping.getRootMappingByClass(clazz); if (resourceMapping == null) { return null; } return marshallIds(resourceMapping, id); }
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; }