Package org.structr.core.graph

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


  public NodeInterface getOtherNode(final NodeInterface node) {

    try {

      NodeFactory nodeFactory = new NodeFactory(securityContext);
      return (NodeInterface)nodeFactory.instantiate(dbRelationship.getOtherNode(node.getNode()));

    } catch (FrameworkException t) {
      // ignore FrameworkException but let NotInTransactionException pass
    }
View Full Code Here


          final String userName = (String) parameters[0];

          for (final Node n : index.get(AbstractNode.name.dbName(), userName)) {

            final NodeInterface s = nodeFactory.instantiate(n);

            if (s.getType().equals(Principal.class.getSimpleName())) {

              return s;
View Full Code Here

         
        }
       
        try {
          for (final Node n : indexHits) {
            final Object u = nodeFactory.instantiate(n);
            if (u != null) {
              return u;
            }
          }
        } finally {
View Full Code Here

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

            try {
              final NodeInterface nodeInterface = nodeFactory.instantiate(node);
              final String uuid = nodeInterface.getProperty(uuidProperty);

              if (uuid != null) {

                nodeInterface.setProperty(GraphObject.id, uuid);
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.