Package org.springframework.data.neo4j.fieldaccess

Examples of org.springframework.data.neo4j.fieldaccess.DynamicProperties.removeProperty()


    @Transactional
    public void testRemoveProperty() {
      Person p = createTestPerson();
   
    DynamicProperties props = p.getPersonalProperties();
    props.removeProperty("s");
    p.persist();
    Node node = nodeFor(p);
    assertEquals(2, IteratorUtil.count(p.getPersonalProperties().getPropertyKeys()));
    assertFalse(node.hasProperty("personalProperties-s"));
    assertEquals(100, node.getProperty("personalProperties-x"));
View Full Code Here


     
      Relationship rel = john.getPersistentState().getSingleRelationship(DynamicRelationshipType.withName("knows"), Direction.OUTGOING);
      assertProperties(rel, "Friendship.");
      john.persist();
     
      props.removeProperty("s");
      rel = john.getPersistentState().getSingleRelationship(DynamicRelationshipType.withName("knows"), Direction.OUTGOING);
     
      final String prefix = "Friendship.";
    assertEquals(100, rel.getProperty(prefix + "personalProperties-x"));
    assertEquals(3.1415, ((Double)rel.getProperty(prefix + "personalProperties-pi")).doubleValue(), 0.000000001);
View Full Code Here

    @Transactional
    public void testRemoveProperty() {
        Person p = createTestPerson();

        DynamicProperties props = p.getPersonalProperties();
        props.removeProperty("s");
        persist(p);
        Node node = nodeFor(p);
        assertEquals(2, IteratorUtil.count(p.getPersonalProperties().getPropertyKeys()));
        assertFalse(node.hasProperty("personalProperties-s"));
        assertEquals(100, node.getProperty("personalProperties-x"));
View Full Code Here

        Relationship rel = getNodeState(john).getSingleRelationship(DynamicRelationshipType.withName("knows"), Direction.OUTGOING);
        assertProperties(rel, "Friendship.");
        persist(john);

        props.removeProperty("s");
        rel = getNodeState(john).getSingleRelationship(DynamicRelationshipType.withName("knows"), Direction.OUTGOING);

        final String prefix = "Friendship.";
        assertEquals(100, rel.getProperty(prefix + "personalProperties-x"));
        assertEquals(3.1415, ((Double) rel.getProperty(prefix + "personalProperties-pi")).doubleValue(), 0.000000001);
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.