Spring Data Neo4j

org.springframework.data.neo4j.fieldaccess
Class ManagedPrefixedDynamicProperties

java.lang.Object
  extended by org.springframework.data.neo4j.fieldaccess.PrefixedDynamicProperties
      extended by org.springframework.data.neo4j.fieldaccess.ManagedPrefixedDynamicProperties
All Implemented Interfaces:
DynamicProperties

public class ManagedPrefixedDynamicProperties
extends PrefixedDynamicProperties

Updates the entity containing such a ManagedPrefixedDynamicProperties when some property is added, changed or deleted.


Field Summary
 
Fields inherited from class org.springframework.data.neo4j.fieldaccess.PrefixedDynamicProperties
prefix
 
Constructor Summary
ManagedPrefixedDynamicProperties(String prefix, int initialCapacity, Neo4jPersistentProperty property, Object entity, Neo4jTemplate template, FieldAccessor fieldAccessor, MappingPolicy mappingPolicy)
           
ManagedPrefixedDynamicProperties(String prefix, Neo4jPersistentProperty property, Object entity, Neo4jTemplate template, FieldAccessor fieldAccessor, MappingPolicy mappingPolicy)
           
 
Method Summary
static ManagedPrefixedDynamicProperties create(String prefix, Neo4jPersistentProperty property, Object entity, Neo4jTemplate template, FieldAccessor fieldAccessor, MappingPolicy mappingPolicy)
           
 DynamicProperties createFrom(Map<String,Object> map)
          Creates a new instance with the properties set from the given map with DynamicProperties.setPropertiesFrom(Map)
 Object removeProperty(String key)
          Removes the property with the given key
 void setPropertiesFrom(Map<String,Object> map)
          Sets a property for all key/value pairs in the given map
 void setProperty(String key, Object value)
          Set the value of the property with the given key to the given value and overwrites it when such a property already exists.
 
Methods inherited from class org.springframework.data.neo4j.fieldaccess.PrefixedDynamicProperties
asMap, equals, getPrefixedProperty, getPrefixedPropertyKeys, getProperty, getProperty, getPropertyKeys, hashCode, hasPrefixedProperty, hasProperty, isPrefixedKey, setPrefixedProperty, setPropertyIfPrefixed
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ManagedPrefixedDynamicProperties

public ManagedPrefixedDynamicProperties(String prefix,
                                        Neo4jPersistentProperty property,
                                        Object entity,
                                        Neo4jTemplate template,
                                        FieldAccessor fieldAccessor,
                                        MappingPolicy mappingPolicy)

ManagedPrefixedDynamicProperties

public ManagedPrefixedDynamicProperties(String prefix,
                                        int initialCapacity,
                                        Neo4jPersistentProperty property,
                                        Object entity,
                                        Neo4jTemplate template,
                                        FieldAccessor fieldAccessor,
                                        MappingPolicy mappingPolicy)
Method Detail

create

public static ManagedPrefixedDynamicProperties create(String prefix,
                                                      Neo4jPersistentProperty property,
                                                      Object entity,
                                                      Neo4jTemplate template,
                                                      FieldAccessor fieldAccessor,
                                                      MappingPolicy mappingPolicy)

setProperty

public void setProperty(String key,
                        Object value)
Description copied from interface: DynamicProperties
Set the value of the property with the given key to the given value and overwrites it when such a property already exists.

Specified by:
setProperty in interface DynamicProperties
Overrides:
setProperty in class PrefixedDynamicProperties
Parameters:
key - key of the property
value - value of the property

removeProperty

public Object removeProperty(String key)
Description copied from interface: DynamicProperties
Removes the property with the given key

Specified by:
removeProperty in interface DynamicProperties
Overrides:
removeProperty in class PrefixedDynamicProperties
Returns:
the property that has been removed or null if no such property exists and DynamicProperties.hasProperty(java.lang.String) returns false

setPropertiesFrom

public void setPropertiesFrom(Map<String,Object> map)
Description copied from interface: DynamicProperties
Sets a property for all key/value pairs in the given map

Specified by:
setPropertiesFrom in interface DynamicProperties
Overrides:
setPropertiesFrom in class PrefixedDynamicProperties
Parameters:
map - that contains the key/value pairs to set

createFrom

public DynamicProperties createFrom(Map<String,Object> map)
Description copied from interface: DynamicProperties
Creates a new instance with the properties set from the given map with DynamicProperties.setPropertiesFrom(Map)

Specified by:
createFrom in interface DynamicProperties
Overrides:
createFrom in class PrefixedDynamicProperties
Parameters:
map - that contains the key/value pairs to set
Returns:
a new DynamicProperties instance

Spring Data Neo4j

Copyright © 2011 SpringSource. All Rights Reserved.