Package org.structr.core.graph

Examples of org.structr.core.graph.RelationshipFactory.instantiate()


      // collect relationships in transactional context
      List<AbstractRelationship> rels = new LinkedList<>();
      try (final Tx tx = StructrApp.getInstance().tx()) {
       
        rels.addAll(relFactory.instantiate(GlobalGraphOperations.at(graphDb).getAllRelationships()));
      }

      long count = bulkGraphOperation(securityContext, rels, 1000, "MigrateRelationships", new BulkGraphOperation<AbstractRelationship>() {

        @Override
View Full Code Here


          // do migration of our own ID properties (and only our own!)
          if (rel.hasProperty("uuid") && rel.getProperty("uuid") instanceof String && !rel.hasProperty("id")) {

            try {
              final RelationshipInterface relInterface = relFactory.instantiate(rel);
              final String uuid = relInterface.getProperty(uuidProperty);

              if (uuid != null) {
                relInterface.setProperty(GraphObject.id, uuid);
                relInterface.removeProperty(uuidProperty);
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.