Package org.neo4j.graphdb

Examples of org.neo4j.graphdb.PropertyContainer.removeProperty()


                node.removeProperty(this.key);
            }
        } else {
            final PropertyContainer propertyContainer = ((Neo4jElement) this.element).getBaseElement();
            if (propertyContainer.hasProperty(this.key)) {
                propertyContainer.removeProperty(this.key);
            }
        }
    }

}
View Full Code Here


           
            // nodeProps now contains the properties that are present on the node, but not in the DynamicProperties -
            // in other words: properties that have been removed. Remove them from the node as well.
      for(String removedKey : nodeProps) {
        if (dynamicProperties.isPrefixedKey(removedKey)) {
          propertyContainer.removeProperty(removedKey);
        }
      }
           
      // Add all properties to the propertyContainer
            for (String key : dynamicProps) {
View Full Code Here

        @Override
        public Object setValue(final GraphBacked<PropertyContainer> graphBacked, final Object newVal) {
            final PropertyContainer propertyContainer = graphBacked.getPersistentState();
            if (newVal==null) {
                propertyContainer.removeProperty(propertyName);
            } else {
                propertyContainer.setProperty(propertyName, newVal);
            }
            return newVal;
        }
View Full Code Here

        Transaction transaction = graph.beginTx();
        try {
            PropertyContainer properties = getGraphProperties();
            String key = getUserKey(user);
            if (permission == Permission.NONE) {
                properties.removeProperty(key);
            } else {
                properties.setProperty(key, permission.name());
            }
            transaction.success();
        } catch (Exception e) {
View Full Code Here

      try {
       
        // save space
        if (convertedValue == null) {

          propertyContainer.removeProperty(dbName());

        } else {

          // Setting last modified date explicetely is not allowed
          if (!AbstractPrimitiveProperty.this.equals(AbstractNode.lastModifiedDate)) {
View Full Code Here

           
            // nodeProps now contains the properties that are present on the node, but not in the DynamicProperties -
            // in other words: properties that have been removed. Remove them from the node as well.
      for(String removedKey : nodeProps) {
        if (dynamicProperties.isPrefixedKey(removedKey)) {
          propertyContainer.removeProperty(removedKey);
        }
      }
           
      // Add all properties to the propertyContainer
            for (String key : dynamicProps) {
View Full Code Here

        @Override
        public Object setValue(final Object entity, final Object newVal, MappingPolicy mappingPolicy) {
            final PropertyContainer propertyContainer = template.getPersistentState(entity);
            try {
                if (newVal==null) {
                    propertyContainer.removeProperty(propertyName);
                } else {
                    propertyContainer.setProperty(propertyName, newVal);
                }
            } catch(ConstraintViolationException cve) {
                throw new DataIntegrityViolationException("Unique constraint violated "+property.getOwner().getName()+"."+property.getName()+" new value "+newVal,cve);
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.