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
AnEntity
in anElement
containing 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 class
Entity.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 Entity
emptyClone()
boolean
equals(Object obj)
boolean
equals(Entity entity)
Object
getIdentifier(IdentifierType identifierType)
Object
getVertex()
Get the vertex object.int
hashCode()
void
putIdentifier(IdentifierType identifierType, Object value)
void
setVertex(Object vertex)
Set the vertex object.Entity
shallowClone()
String
toString()
-
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:EntityId
Get the vertex object.
-
setVertex
public void setVertex(Object vertex)
Description copied from interface:EntityId
Set the vertex object.
-
getIdentifier
public Object getIdentifier(IdentifierType identifierType)
- Specified by:
getIdentifier
in classElement
-
putIdentifier
public void putIdentifier(IdentifierType identifierType, Object value)
-
equals
public boolean equals(Entity entity)
-
emptyClone
public Entity emptyClone()
- Specified by:
emptyClone
in classElement
-
shallowClone
public Entity shallowClone()
- Overrides:
shallowClone
in classElement
-
-