Examples of Friendship


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

 
  @Test(expected=ValidationException.class)
    public void testRelationshipPropertyValidation() {
        final Person john = personRepo.save(new Person("John", 50));
        final Person jack = personRepo.save(new Person("Jack", 45));
        final Friendship friendship = john.knows(jack);
        friendship.setYears(100);
        friendshipRepo.save(friendship);
    }
View Full Code Here

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

        storeInGraph(andres);

        Relationship friendshipRelationship = makeFriends(michaelNode(), andresNode(), 19);

        Person m = readPerson(michaelNode());
        Friendship friendship = first(m.getFriendships());

        assertEquals((Long) friendshipRelationship.getId(), friendship.getId());
        assertEquals(19, friendship.getYears());
        assertEquals(friendship.getPerson1(), michael);
        assertEquals(friendship.getPerson2(), andres);
    }
View Full Code Here

Examples of twitter4j.Friendship

            JSONArray list = res.asJSONArray();
            int size = list.length();
            ResponseList<Friendship> friendshipList = new ResponseListImpl<Friendship>(size, res);
            for (int i = 0; i < size; i++) {
                JSONObject json = list.getJSONObject(i);
                Friendship friendship = new FriendshipJSONImpl(json);
                if (conf.isJSONStoreEnabled()) {
                    DataObjectFactoryUtil.registerJSONObject(friendship, json);
                }
                friendshipList.add(friendship);
            }
View Full Code Here

Examples of user.Friendship

    Transaction tr = null;;
    try{
      tr = session.beginTransaction();
      User owner = findOne(mail_owner);
      /*Hibernate.initialize(owner.getFriends());*/
      owner.addFriend(new Friendship(owner, target, 0));
      session.update(owner);
      tr.commit();
    }catch (Exception e) {
      tr.rollback();
      e.printStackTrace();
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.