public void retrieveAllMappedAttributes(Session session, Object object) { String path = null; try { ClassDescriptor classDescriptor = getClassDescriptor(object.getClass()); String pathFieldName = classDescriptor.getPathFieldDescriptor().getFieldName(); path = (String) ReflectionUtils.getNestedProperty(object, pathFieldName); Node node = (Node) session.getItem(path); retrieveBeanFields(session, classDescriptor, node, path, object, true); retrieveCollectionFields(session, classDescriptor, node, object, true); } catch (PathNotFoundException pnfe) { throw new ObjectContentManagerException("Impossible to get the object at " + path, pnfe); } catch (RepositoryException re) { throw new org.apache.jackrabbit.ocm.exception.RepositoryException("Impossible to get the object at " + path, re); } }
public void retrieveAllMappedAttributes(Session session, Object object) { String path = null; try { ClassDescriptor classDescriptor = getClassDescriptor(object.getClass()); String pathFieldName = classDescriptor.getPathFieldDescriptor().getFieldName(); path = (String) ReflectionUtils.getNestedProperty(object, pathFieldName); Node node = session.getNode(path); retrieveBeanFields(session, classDescriptor, node, object, true); retrieveCollectionFields(session, classDescriptor, node, object, true); } catch (PathNotFoundException pnfe) { throw new ObjectContentManagerException("Impossible to get the object at " + path, pnfe); } catch (RepositoryException re) { throw new org.apache.jackrabbit.ocm.exception.RepositoryException("Impossible to get the object at " + path, re); } }
ClassDescriptor classDescriptor = getClassDescriptor(clazz); if (node.hasProperty(ManagerConstant.DISCRIMINATOR_CLASS_NAME_PROPERTY)) { String className = node.getProperty(ManagerConstant.DISCRIMINATOR_CLASS_NAME_PROPERTY).getValue().getString(); alternativeDescriptor = getClassDescriptor(ReflectionUtils.forName(className));
ClassDescriptor classDescriptor = getClassDescriptor(clazz); if (node.hasProperty(ManagerConstant.DISCRIMINATOR_CLASS_NAME_PROPERTY)) { String className = node.getProperty(ManagerConstant.DISCRIMINATOR_CLASS_NAME_PROPERTY).getValue().getString(); alternativeDescriptor = getClassDescriptor(ReflectionUtils.forName(className));
ClassDescriptor classDescriptor = null; try { classDescriptor = getClassDescriptor(object.getClass()); String pathFieldName = classDescriptor.getPathFieldDescriptor().getFieldName(); path = (String) ReflectionUtils.getNestedProperty(object, pathFieldName);
ClassDescriptor classDescriptor = null; try { classDescriptor = getClassDescriptor(object.getClass()); String pathFieldName = classDescriptor.getPathFieldDescriptor().getFieldName(); path = (String) ReflectionUtils.getNestedProperty(object, pathFieldName);