Package com.graphaware.common.policy.spel

Examples of com.graphaware.common.policy.spel.SpelRelationshipInclusionPolicy


        }

        try (Transaction tx = database.beginTx()) {
            assertNull(new RandomRelationshipSelector(IncludeRelationships.all().with(withName("NOT_EXIST"))).selectRelationship(database.getNodeById(0)));
            assertNull(new RandomRelationshipSelector(IncludeRelationships.all().with(INCOMING)).selectRelationship(database.getNodeById(0)));
            assertNull(new RandomRelationshipSelector(new SpelRelationshipInclusionPolicy("isOutgoing() && otherNode.hasLabel('Test')")).selectRelationship(database.getNodeById(0)));
            tx.success();
        }
    }
View Full Code Here


            tx.success();
        }

        try (Transaction tx = database.beginTx()) {
            assertEquals(0, new RandomRelationshipSelector(IncludeRelationships.all().with(OUTGOING)).selectRelationship(database.getNodeById(0)).getId());
            assertEquals(0, new RandomRelationshipSelector(new SpelRelationshipInclusionPolicy("isOutgoing() && otherNode.hasLabel('Test')")).selectRelationship(database.getNodeById(0)).getId());
            tx.success();
        }
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    @Override
    protected RelationshipInclusionPolicy spelPolicy(String spel) {
        return new SpelRelationshipInclusionPolicy(spel);
    }
View Full Code Here

TOP

Related Classes of com.graphaware.common.policy.spel.SpelRelationshipInclusionPolicy

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.