|
Spring Data Neo4j | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.data.neo4j.fieldaccess.PrefixedDynamicProperties
public class PrefixedDynamicProperties
Stores the properties internally with prefixed keys. When using the methods from DynamicProperties
the prefix
is dynamically added and removed so that the prefixing is not visible when using the DynamicProperties
interface.
The methods *PrefixedProperty() allow to access the prefixed property key/values pairs directly.
Field Summary | |
---|---|
protected String |
prefix
|
Constructor Summary | |
---|---|
PrefixedDynamicProperties(String prefix)
|
|
PrefixedDynamicProperties(String prefix,
int initialCapacity)
|
Method Summary | |
---|---|
Map<String,Object> |
asMap()
|
DynamicProperties |
createFrom(Map<String,Object> map)
Creates a new instance with the properties set from the given map with DynamicProperties.setPropertiesFrom(Map) |
boolean |
equals(Object obj)
|
Object |
getPrefixedProperty(String key)
|
Set<String> |
getPrefixedPropertyKeys()
|
Object |
getProperty(String key)
|
Object |
getProperty(String key,
Object defaultValue)
|
Iterable<String> |
getPropertyKeys()
Returns all keys |
int |
hashCode()
|
boolean |
hasPrefixedProperty(String key)
|
boolean |
hasProperty(String key)
|
boolean |
isPrefixedKey(String key)
|
Object |
removeProperty(String key)
Removes the property with the given key |
void |
setPrefixedProperty(String key,
Object value)
|
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. |
boolean |
setPropertyIfPrefixed(String key,
Object value)
Set the property with the given key only if the key is prefixed. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final String prefix
Constructor Detail |
---|
public PrefixedDynamicProperties(String prefix)
prefix
- the prefix to be added internally to the keyspublic PrefixedDynamicProperties(String prefix, int initialCapacity)
prefix
- the prefix to be added internally to the keysinitialCapacity
- the initialCapacity of the internal map that holds the propertiesMethod Detail |
---|
public boolean hasProperty(String key)
hasProperty
in interface DynamicProperties
key
- the key to be checked
public Object getProperty(String key)
getProperty
in interface DynamicProperties
key
- key of the property to get
DynamicProperties.hasProperty(java.lang.String)
returns falsepublic Object getProperty(String key, Object defaultValue)
getProperty
in interface DynamicProperties
key
- key of the property to getdefaultValue
- the default value to return if no property with the given key exists
DynamicProperties.hasProperty(java.lang.String)
returns falsepublic void setProperty(String key, Object value)
DynamicProperties
setProperty
in interface DynamicProperties
key
- key of the propertyvalue
- value of the propertypublic Object removeProperty(String key)
DynamicProperties
removeProperty
in interface DynamicProperties
DynamicProperties.hasProperty(java.lang.String)
returns
falsepublic Iterable<String> getPropertyKeys()
DynamicProperties
getPropertyKeys
in interface DynamicProperties
public void setPropertiesFrom(Map<String,Object> map)
DynamicProperties
setPropertiesFrom
in interface DynamicProperties
map
- that contains the key/value pairs to setpublic DynamicProperties createFrom(Map<String,Object> map)
DynamicProperties
DynamicProperties.setPropertiesFrom(Map)
createFrom
in interface DynamicProperties
map
- that contains the key/value pairs to set
public Map<String,Object> asMap()
asMap
in interface DynamicProperties
public boolean setPropertyIfPrefixed(String key, Object value)
key
- key of the propertyvalue
- value
public boolean isPrefixedKey(String key)
public Object getPrefixedProperty(String key)
public void setPrefixedProperty(String key, Object value)
public boolean hasPrefixedProperty(String key)
public Set<String> getPrefixedPropertyKeys()
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
|
Spring Data Neo4j | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |