Package org.exoplatform.services.jcr.impl.util

Examples of org.exoplatform.services.jcr.impl.util.EntityCollection


                  PropertyImpl item = (PropertyImpl)dataManager.readItem(child, nodeData(), true, false);
                  session.getActionHandler().postRead(item);
                  props.add(item);

               }
               return new EntityCollection(props);
            }
            else
            {
               // lazy iterator
               return new LazyPropertyIterator(childs);
            }
         }
         else
         {
            // return empty
            return new EntityCollection();
         }
      }
      finally
      {
         if (LOG.isDebugEnabled())
View Full Code Here


                     session.getActionHandler().postRead(item);
                     props.add(item);
                  }

               }
               return new EntityCollection(props);
            }
            else
            {
               // lazy iterator
               return new LazyPropertyIterator(childs, filter);
            }
         }
         else
         {
            // return empty
            return new EntityCollection();
         }
      }
      finally
      {
         if (LOG.isDebugEnabled())
View Full Code Here

   public PropertyIterator getReferences() throws RepositoryException
   {

      checkValid();

      return new EntityCollection(dataManager.getReferences(getInternalIdentifier()));
   }
View Full Code Here

      ItemDataMergeVisitor visitor = new ItemDataMergeVisitor(this.session, corrSession, failed, bestEffort);
      this.nodeData().accept(visitor);

      SessionChangesLog changes = visitor.getMergeChanges();

      EntityCollection failedIter = createMergeFailed(failed, changes);

      if (changes.getSize() > 0)
      {
         dataManager.getTransactManager().save(changes);
      }
View Full Code Here

   private EntityCollection createMergeFailed(Map<String, String> failed, SessionChangesLog changes)
      throws RepositoryException
   {

      EntityCollection res = new EntityCollection();
      TransientPropertyData mergeFailed =
         (TransientPropertyData)dataManager.getItemData(nodeData(), new QPathEntry(Constants.JCR_MERGEFAILED, 0),
            ItemType.PROPERTY);

      List<ValueData> mergeFailedRefs = new ArrayList<ValueData>();
      int state = 0;
      try
      {
         if (mergeFailed != null)
         {
            for (ValueData mfvd : mergeFailed.getValues())
            {
               mergeFailedRefs.add(new TransientValueData(mfvd.getAsByteArray()));
            }

            mergeFailed =
               new TransientPropertyData(mergeFailed.getQPath(), mergeFailed.getIdentifier(), mergeFailed
                  .getPersistedVersion(), mergeFailed.getType(), mergeFailed.getParentIdentifier(), mergeFailed
                  .isMultiValued(), mergeFailedRefs);

            state = ItemState.UPDATED;
         }
         else
         {
            mergeFailed =
               TransientPropertyData.createPropertyData((NodeData)getData(), Constants.JCR_MERGEFAILED,
                  PropertyType.REFERENCE, true, mergeFailedRefs);
            state = ItemState.ADDED;
         }

         nextFail : for (String identifier : failed.keySet())
         {
            NodeImpl versionable = (NodeImpl)session.getNodeByUUID(identifier);
            res.add(versionable);
            String offendingIdentifier = failed.get(identifier);

            for (ValueData vd : mergeFailedRefs)
            {
               String mfIdentifier = new String(vd.getAsByteArray());
View Full Code Here

   {
      checkValid();

      List<NodeData> versionsDataList = getData().getAllVersionsData();

      EntityCollection versions = new EntityCollection();

      for (NodeData vd : versionsDataList)
      {
         versions.add(new VersionImpl(vd, session));
      }

      return versions;

   }
View Full Code Here

                  NodeImpl item = (NodeImpl)dataManager.readItem(child, nodeData(), true, false);
                  session.getActionHandler().postRead(item);
                  nodes.add(item);
               }
            }
            return new EntityCollection(nodes);
         }
         else
         {
            // lazy iterator
            return new LazyNodeIterator(childs);
View Full Code Here

                  NodeImpl item = (NodeImpl)dataManager.readItem(child, nodeData(), true, false);
                  session.getActionHandler().postRead(item);
                  nodes.add(item);
               }
            }
            return new EntityCollection(nodes);
         }
         else
         {
            // lazy iterator
            return new LazyNodeIterator(childNodesData(), filter);
View Full Code Here

                  PropertyImpl item = (PropertyImpl)dataManager.readItem(child, nodeData(), true, false);
                  session.getActionHandler().postRead(item);
                  props.add(item);

               }
               return new EntityCollection(props);
            }
            else
            {
               // lazy iterator
               return new LazyPropertyIterator(childs);
            }
         }
         else
         {
            // return empty
            return new EntityCollection();
         }
      }
      finally
      {
         if (LOG.isDebugEnabled())
View Full Code Here

                     session.getActionHandler().postRead(item);
                     props.add(item);
                  }

               }
               return new EntityCollection(props);
            }
            else
            {
               // lazy iterator
               return new LazyPropertyIterator(childPropertiesData(), filter);
            }
         }
         else
         {
            // return empty
            return new EntityCollection();
         }
      }
      finally
      {
         if (LOG.isDebugEnabled())
View Full Code Here

TOP

Related Classes of org.exoplatform.services.jcr.impl.util.EntityCollection

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.