Package uk.gov.gchq.gaffer.data.element
Class Entity
- java.lang.Object
-
- uk.gov.gchq.gaffer.data.element.Element
-
- uk.gov.gchq.gaffer.data.element.Entity
-
- All Implemented Interfaces:
Serializable,ElementId,EntityId
- Direct Known Subclasses:
LazyEntity
public class Entity extends Element implements EntityId
AnEntityin anElementcontaining a single vertex. The vertex can be any type ofObject. There is no requirement for this vertex to connect to anEntity's source or destination vertex - for example you could have a 'graph' of just entities. Entities are designed so that multiple entities can share the same vertex but are distinguished via their group.- See Also:
Entity.Builder, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEntity.Builder-
Nested classes/interfaces inherited from interface uk.gov.gchq.gaffer.data.element.id.ElementId
ElementId.Matches
-
-
Field Summary
-
Fields inherited from class uk.gov.gchq.gaffer.data.element.Element
DEFAULT_GROUP
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EntityemptyClone()booleanequals(Object obj)booleanequals(Entity entity)ObjectgetIdentifier(IdentifierType identifierType)ObjectgetVertex()Get the vertex object.inthashCode()voidputIdentifier(IdentifierType identifierType, Object value)voidsetVertex(Object vertex)Set the vertex object.EntityshallowClone()StringtoString()-
Methods inherited from class uk.gov.gchq.gaffer.data.element.Element
copyProperties, getElement, getGroup, getProperties, getProperty, putProperty, removeProperty, shallowEquals, shallowEquals
-
Methods inherited from interface uk.gov.gchq.gaffer.data.element.id.ElementId
getClassName, setClassName
-
-
-
-
Constructor Detail
-
Entity
public Entity(String group)
-
Entity
public Entity(String group, Object vertex)
Constructs an instance of Entity.- Parameters:
group- the Entity groupvertex- the vertex
-
Entity
public Entity(String group, Object vertex, Properties properties)
Constructs an instance of Entity.- Parameters:
group- the Entity groupvertex- the vertexproperties- the entity properties
-
-
Method Detail
-
getVertex
public Object getVertex()
Description copied from interface:EntityIdGet the vertex object.
-
setVertex
public void setVertex(Object vertex)
Description copied from interface:EntityIdSet the vertex object.
-
getIdentifier
public Object getIdentifier(IdentifierType identifierType)
- Specified by:
getIdentifierin classElement
-
putIdentifier
public void putIdentifier(IdentifierType identifierType, Object value)
-
equals
public boolean equals(Entity entity)
-
emptyClone
public Entity emptyClone()
- Specified by:
emptyClonein classElement
-
shallowClone
public Entity shallowClone()
- Overrides:
shallowClonein classElement
-
-