Class GraphEntity
- java.lang.Object
-
- com.redislabs.redisgraph.graph_entities.GraphEntity
-
-
Field Summary
Fields Modifier and Type Field Description protected long
id
protected 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 void
addProperty(Property property)
Add a property to the entityvoid
addProperty(String name, Object value)
Adds a property to the entity, by composing name, type and value to a property objectboolean
equals(Object o)
Set<String>
getEntityPropertyNames()
long
getId()
int
getNumberOfProperties()
Property
getProperty(String propertyName)
int
hashCode()
void
removeProperty(String name)
void
setId(long id)
abstract String
toString()
-
-
-
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
-
-