Class GraphEntity
- java.lang.Object
-
- com.redislabs.redisgraph.graph_entities.GraphEntity
-
-
Field Summary
Fields Modifier and Type Field Description protected longidprotected Map<String,Property<?>>propertyMap
-
Constructor Summary
Constructors Constructor Description GraphEntity()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddProperty(Property property)Add a property to the entityvoidaddProperty(String name, Object value)Adds a property to the entity, by composing name, type and value to a property objectbooleanequals(Object o)Set<String>getEntityPropertyNames()longgetId()intgetNumberOfProperties()PropertygetProperty(String propertyName)inthashCode()voidremoveProperty(String name)voidsetId(long id)abstract StringtoString()
-
-
-
Method Detail
-
getId
public long getId()
- Returns:
- entity id
-
setId
public void setId(long id)
- Parameters:
id- - entity id to be set
-
addProperty
public void addProperty(String name, Object value)
Adds a property to the entity, by composing name, type and value to a property object- Parameters:
name-value-
-
getEntityPropertyNames
public Set<String> getEntityPropertyNames()
- Returns:
- Entity's property names, as a Set
-
addProperty
public void addProperty(Property property)
Add a property to the entity- Parameters:
property-
-
getNumberOfProperties
public int getNumberOfProperties()
- Returns:
- number of properties
-
getProperty
public Property getProperty(String propertyName)
- Parameters:
propertyName- - property name as lookup key (String)- Returns:
- property object, or null if key is not found
-
removeProperty
public void removeProperty(String name)
- Parameters:
name- - the name of the property to be removed
-
-