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

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


        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


                return null;
            }
            Property property = parentNode.getProperty(jcrName);
            Value[] values = property.getValues();

            ManageableObjects objects = ManageableObjectsUtil.getManageableObjects(collectionFieldClass);

            // For collection of bean references, only Collections are supported
            if (! (objects instanceof ManageableCollection))
            {
View Full Code Here

            }

            Property property = parentNode.getProperty(jcrName);
            Value[] values = property.getValues();

            ManageableObjects objects = ManageableObjectsUtil.getManageableObjects(collectionFieldClass);

            // For maps of bean references, only Maps are supported
            if (!(objects instanceof ManageableMap)) {

                throw new JcrMappingException("Impossible to retrieve the attribute "
View Full Code Here

      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
      {
        // TODO: find another for managing custom ManageableObjects classes
          if ( ! objects.getClass().equals(ManageableCollectionImpl.class) &&
             ! objects.getClass().equals(ManageableMapImpl.class))
          {
            ReflectionUtils.setNestedProperty(object, collectionDescriptor.getFieldName(), objects);
          }
          else
          {
            ReflectionUtils.setNestedProperty(object, collectionDescriptor.getFieldName(), objects.getObjects());
          }
      }

    }
View Full Code Here

        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

        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

  @Override
  protected Object fetchTarget() {
    if (isInitialized()) {
      throw new IllegalStateException("Proxy already initialized");
    }
    ManageableObjects objects = collectionConverter.getCollection(session, collectionParentNode, collectionDescriptor,
        collectionFieldClass);
    Object target = objects.getObjects();
    clean();
    return target;
  }
View Full Code Here

            PropertyIterator pi = parentNode.getProperties(jcrName);
            if (!pi.hasNext()) {
                return null;
            }

            ManageableObjects objects = ManageableObjectsUtil.getManageableObjects(collectionFieldClass);
            AtomicTypeConverter atomicTypeConverter = getAtomicTypeConverter(collectionDescriptor);

            while (pi.hasNext()) {
                Property prop = pi.nextProperty();
View Full Code Here

                return null;
            }
            Property property = parentNode.getProperty(jcrName);
            Value[] values = property.getValues();

            ManageableObjects objects = ManageableObjectsUtil.getManageableObjects(collectionFieldClass);

            // For collection of bean references, only Collections are supported
            if (! (objects instanceof ManageableCollection))
            {
View Full Code Here

            }

            Property property = parentNode.getProperty(jcrName);
            Value[] values = property.getValues();

            ManageableObjects objects = ManageableObjectsUtil.getManageableObjects(collectionFieldClass);

            // For maps of bean references, only Maps are supported
            if (!(objects instanceof ManageableMap)) {

                throw new JcrMappingException("Impossible to retrieve the attribute "
View Full Code Here

TOP

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

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.