Package org.apache.jackrabbit.ocm.manager.collectionconverter

Examples of org.apache.jackrabbit.ocm.manager.collectionconverter.CollectionConverter


  {
    if (!collectionDescriptor.isAutoRetrieve() && !forceToRetrieve) {
      return;
    }

    CollectionConverter collectionConverter = this.getCollectionConverter(session, collectionDescriptor);
    Class collectionFieldClass = ReflectionUtils.getPropertyType(object, collectionDescriptor.getFieldName());
    ManageableCollection collection = null;
    if (collectionDescriptor.isProxy()) {
      collection = (ManageableCollection) proxyManager.createCollectionProxy(session, collectionConverter, parentNode,
          collectionDescriptor, collectionFieldClass);

    } else {
      collection = collectionConverter.getCollection(session, parentNode, collectionDescriptor, collectionFieldClass);
    }

    ReflectionUtils.setNestedProperty(object, collectionDescriptor.getFieldName(), collection);
  }
View Full Code Here


      if (!collectionDescriptor.isAutoInsert()) {
        continue;
      }

      CollectionConverter collectionConverter = this.getCollectionConverter(session, collectionDescriptor);
      Object collection = ReflectionUtils.getNestedProperty(object, collectionDescriptor.getFieldName());
      ManageableCollection manageableCollection = ManageableCollectionUtil.getManageableCollection(collection);

      collectionConverter.insertCollection(session, objectNode, collectionDescriptor, manageableCollection);
    }
  }
View Full Code Here

      CollectionDescriptor collectionDescriptor = (CollectionDescriptor) collectionDescriptorIterator.next();
      if (!collectionDescriptor.isAutoUpdate()) {
        continue;
      }

      CollectionConverter collectionConverter = this.getCollectionConverter(session, collectionDescriptor);
      Object collection = ReflectionUtils.getNestedProperty(object, collectionDescriptor.getFieldName());
      ManageableCollection manageableCollection = ManageableCollectionUtil.getManageableCollection(collection);

      collectionConverter.updateCollection(session, objectNode, collectionDescriptor, manageableCollection);
    }
  }
View Full Code Here

  {
    if (!collectionDescriptor.isAutoRetrieve() && !forceToRetrieve) {
      return;
    }

    CollectionConverter collectionConverter = this.getCollectionConverter(session, collectionDescriptor);
    Class collectionFieldClass = ReflectionUtils.getPropertyType(object, collectionDescriptor.getFieldName());
    if (collectionDescriptor.isProxy()) {
      Object proxy = proxyManager.createCollectionProxy(session, collectionConverter, parentNode,
          collectionDescriptor, collectionFieldClass);
      ReflectionUtils.setNestedProperty(object, collectionDescriptor.getFieldName(), proxy);
    }
    else
    {
            ManageableObjects objects = collectionConverter.getCollection(session, parentNode, collectionDescriptor, collectionFieldClass);
      if (objects==null)
      {
        ReflectionUtils.setNestedProperty(object, collectionDescriptor.getFieldName(), null);
      }
      else
View Full Code Here

      if (!collectionDescriptor.isAutoInsert()) {
        continue;
      }

      CollectionConverter collectionConverter = this.getCollectionConverter(session, collectionDescriptor);
      Object collection = ReflectionUtils.getNestedProperty(object, collectionDescriptor.getFieldName());
      ManageableObjects manageableCollection = ManageableObjectsUtil.getManageableObjects(collection);

      collectionConverter.insertCollection(session, objectNode, collectionDescriptor, manageableCollection);
    }
  }
View Full Code Here

      CollectionDescriptor collectionDescriptor = (CollectionDescriptor) collectionDescriptorIterator.next();
      if (!collectionDescriptor.isAutoUpdate()) {
        continue;
      }

      CollectionConverter collectionConverter = this.getCollectionConverter(session, collectionDescriptor);
      Object collection = ReflectionUtils.getNestedProperty(object, collectionDescriptor.getFieldName());
      ManageableObjects manageableCollection = ManageableObjectsUtil.getManageableObjects(collection);

      collectionConverter.updateCollection(session, objectNode, collectionDescriptor, manageableCollection);
    }
  }
View Full Code Here

  {
    if (!collectionDescriptor.isAutoRetrieve() && !forceToRetrieve) {
      return;
    }

    CollectionConverter collectionConverter = this.getCollectionConverter(session, collectionDescriptor);
    Class collectionFieldClass = ReflectionUtils.getPropertyType(object, collectionDescriptor.getFieldName());
    ManageableObjects objects = null;
    if (collectionDescriptor.isProxy()) {
      Object proxy = proxyManager.createCollectionProxy(session, collectionConverter, parentNode,
          collectionDescriptor, collectionFieldClass);
      ReflectionUtils.setNestedProperty(object, collectionDescriptor.getFieldName(), proxy);
    }
    else
    {
      objects = collectionConverter.getCollection(session, parentNode, collectionDescriptor, collectionFieldClass);
      if (objects==null)
      {
        ReflectionUtils.setNestedProperty(object, collectionDescriptor.getFieldName(), null);
      }
      else
View Full Code Here

      if (!collectionDescriptor.isAutoInsert()) {
        continue;
      }

      CollectionConverter collectionConverter = this.getCollectionConverter(session, collectionDescriptor);
      Object collection = ReflectionUtils.getNestedProperty(object, collectionDescriptor.getFieldName());
      ManageableObjects manageableCollection = ManageableObjectsUtil.getManageableObjects(collection);

      collectionConverter.insertCollection(session, objectNode, collectionDescriptor, manageableCollection);
    }
  }
View Full Code Here

      CollectionDescriptor collectionDescriptor = (CollectionDescriptor) collectionDescriptorIterator.next();
      if (!collectionDescriptor.isAutoUpdate()) {
        continue;
      }

      CollectionConverter collectionConverter = this.getCollectionConverter(session, collectionDescriptor);
      Object collection = ReflectionUtils.getNestedProperty(object, collectionDescriptor.getFieldName());
      ManageableObjects manageableCollection = ManageableObjectsUtil.getManageableObjects(collection);

      collectionConverter.updateCollection(session, objectNode, collectionDescriptor, manageableCollection);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.ocm.manager.collectionconverter.CollectionConverter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.