Examples of CollectionConverter


Examples of net.buffalo.protocal.converters.collection.CollectionConverter

        "<double>9.09</double>" +
        "</list>", stringWriter.getBuffer().toString());
  }
 
  public void testNestedList() throws Exception {
    CollectionConverter s = new CollectionConverter();
    List list2 = new ArrayList();
    list2.add(new Integer(100));
    List list1 = new ArrayList();
    list1.add("man");
    list1.add(list2);
    s.marshal(list1, context, streamWriter);
    assertEquals("<list>" +
        "<type>java.util.ArrayList</type>" +
        "<length>2</length>" +
        "<string>man</string>" +
        "<list>" +
View Full Code Here

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

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

      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

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

      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

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());
    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

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

      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

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

      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

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());
    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

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

      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

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

      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
Copyright © 2018 www.massapi.com. 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.