Package org.springframework.data.neo4j.model

Examples of org.springframework.data.neo4j.model.Group


        Node p1 = createNewNode();
        Node p2 = createNewNode();
        groupNode.createRelationshipTo(p1, PERSONS);
        groupNode.createRelationshipTo(p2, PERSONS);

        Group g = readGroup(groupNode);
        assertEquals(set(readPerson(p1), readPerson(p2)), set(g.getPersons()));
    }
View Full Code Here


        Node p1 = createNewNode();
        Node p2 = createNewNode();
        groupNode.createRelationshipTo(p1, PERSONS);
        groupNode.createRelationshipTo(p2, PERSONS);

        Group g = readGroup(groupNode);
        assertEquals(set(readPerson(p1), readPerson(p2)), set(g.getReadOnlyPersons()));
    }
View Full Code Here

        Node groupNode = createNewNode();
        Node julianNode = createNewNode();
        julianNode.setProperty("name", "Julian");
        groupNode.createRelationshipTo(julianNode, PERSONS);

        Group g = readGroup(groupNode);

        assertNull(first(g.getPersons()).getName());
    }
View Full Code Here

        Node groupNode = createNewNode();
        Node julianNode = createNewNode();
        julianNode.setProperty("name", "Julian");
        groupNode.createRelationshipTo(julianNode, DynamicRelationshipType.withName("fetchedPersons"));

        Group g = readGroup(groupNode);

        assertEquals("Julian", first(g.getFetchedPersons()).getName());
    }
View Full Code Here

        template = new Neo4jTemplate(infrastructure);
        conversionService = template.getConversionService();


        tx = template.getGraphDatabase().beginTx();
        group = new Group();
        michael = new Person("Michael", 37);
        emil = new Person("Emil", 30);
        andres = new Person("Andrés", 36);
    }
View Full Code Here

    // DATAGRAPH-257
    @Transactional
    @Test
    public void testPropertyQueryOfTypeSetPopulatedCorrectly() {
        Group grp = neo4jTemplate.findOne(matrixTeam.matrixGroup.getId(), Group.class);
        Set<Person> members = grp.getTeamMembersAsSetViaQuery();
        assertThat( members, hasSize(3));
        assertThat( members, hasItems( matrixTeam.neo, matrixTeam.trinity, matrixTeam.cypher));

        assertNull(members.iterator().next().getName());
    }
View Full Code Here

    // DATAGRAPH-257
    @Transactional
    @Test
    public void testPropertyQueryOfTypeIterablePopulatedCorrectly() {
        Group grp = neo4jTemplate.findOne(matrixTeam.matrixGroup.getId(), Group.class);
        Iterable<Person> itMembers = grp.getTeamMembersAsIterableViaQuery();
        assertNotNull(itMembers);
        Collection<Person> members = asCollection(itMembers);
        assertThat( members, hasSize(3));
        assertThat( members, hasItems( matrixTeam.neo, matrixTeam.trinity, matrixTeam.cypher));
        assertNull(members.iterator().next().getName());
View Full Code Here

    // DATAGRAPH-257
    @Transactional
    @Test
    @Ignore("@Fetch breaks Neo4jEntityConverterTests - investigation required")
    public void testFetchedPropertyQueryOfTypeIterablePopulatedCorrectly() {
        Group grp = neo4jTemplate.findOne(matrixTeam.matrixGroup.getId(), Group.class);
        Iterable<Person> itMembers = grp.getFetchedTeamMembersAsIterableViaQuery();
        Collection<Person> members = asCollection(itMembers);
        assertExpectionsOfMatrixTeamSetResult(members);
    }
View Full Code Here

    // DATAGRAPH-257
    @Transactional
    @Test
    @Ignore("@Fetch breaks Neo4jEntityConverterTests - investigation required")
    public void testFetchedPropertyQueryOfTypeSetPopulatedCorrectly() {
        Group grp = neo4jTemplate.findOne(matrixTeam.matrixGroup.getId(), Group.class);
        Set<Person> members = grp.getFetchedTeamMembersAsSetViaQuery();
        assertExpectionsOfMatrixTeamSetResult(members);
    }
View Full Code Here

        friendShip3 = nicki.knows(michael);
        friendShip3.setYears(0);

        friendShip = michael.knows(david);
        friendShip.setYears(2);
        serialTesterGroup = new Group();
        serialTesterGroup.setName("SDN-upgraders");
        serialTesterGroup.addPerson(michael);
        serialTesterGroup.addPerson(nicki);
        serialTesterGroup.addPerson(david);
View Full Code Here

TOP

Related Classes of org.springframework.data.neo4j.model.Group

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.