Package com.graphaware.common.wrapper
Class BaseEntity
- java.lang.Object
-
- com.graphaware.common.wrapper.BaseEntity
-
- All Implemented Interfaces:
Entity
- Direct Known Subclasses:
BaseEntityWrapper
public abstract class BaseEntity extends Object implements Entity
Base class for customEntity
implementations.
-
-
Constructor Summary
Constructors Constructor Description BaseEntity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>
getAllProperties()
Node[]
getNodes()
Node
getOtherNode(Node node)
Map<String,Object>
getProperties(String... keys)
Object
getProperty(String key, Object defaultValue)
Relationship
getSingleRelationship(RelationshipType type, Direction dir)
(@see org.neo4j.graphdb.Node#getSingleRelationship(org.neo4j.graphdb.RelationshipType, org.neo4j.graphdb.Direction)).boolean
hasRelationship()
boolean
hasRelationship(Direction dir)
boolean
hasRelationship(Direction direction, RelationshipType... types)
boolean
hasRelationship(RelationshipType... types)
boolean
hasRelationship(RelationshipType type, Direction dir)
boolean
isType(RelationshipType type)
protected Node
node()
protected Relationship
relationship()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.neo4j.graphdb.Entity
getId, getProperty, getPropertyKeys, hasProperty, removeProperty, setProperty
-
-
-
-
Method Detail
-
getProperty
public Object getProperty(String key, Object defaultValue)
- Specified by:
getProperty
in interfaceEntity
-
getAllProperties
public Map<String,Object> getAllProperties()
- Specified by:
getAllProperties
in interfaceEntity
-
getProperties
public Map<String,Object> getProperties(String... keys)
- Specified by:
getProperties
in interfaceEntity
-
getNodes
public Node[] getNodes()
-
getSingleRelationship
public Relationship getSingleRelationship(RelationshipType type, Direction dir)
(@see org.neo4j.graphdb.Node#getSingleRelationship(org.neo4j.graphdb.RelationshipType, org.neo4j.graphdb.Direction)).
-
hasRelationship
public boolean hasRelationship()
- See Also:
Node.hasRelationship()
-
hasRelationship
public boolean hasRelationship(RelationshipType... types)
-
hasRelationship
public boolean hasRelationship(Direction direction, RelationshipType... types)
-
hasRelationship
public boolean hasRelationship(Direction dir)
-
hasRelationship
public boolean hasRelationship(RelationshipType type, Direction dir)
-
isType
public boolean isType(RelationshipType type)
-
node
protected Node node()
- Returns:
- self as node.
- Throws:
IllegalStateException
- if this instance isn't aNode
.
-
relationship
protected Relationship relationship()
- Returns:
- self as relationship.
- Throws:
IllegalStateException
- if this instance isn't aRelationship
.
-
-