Class IncludeNodes
- java.lang.Object
-
- com.graphaware.common.policy.inclusion.BaseEntityInclusionPolicy<T>
-
- com.graphaware.common.policy.inclusion.fluent.IncludeEntities<T,Node>
-
- com.graphaware.common.policy.inclusion.fluent.BaseIncludeNodes<IncludeNodes>
-
- com.graphaware.common.policy.inclusion.fluent.IncludeNodes
-
- All Implemented Interfaces:
EntityInclusionPolicy<Node>
,InclusionPolicy
,NodeInclusionPolicy
,ObjectInclusionPolicy<Node>
public class IncludeNodes extends BaseIncludeNodes<IncludeNodes>
An implementation ofNodeInclusionPolicy
that is entirely configurable using its fluent interface.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
IncludeNodes(String label, DetachedPropertiesDescription propertiesDescription)
Create a new policy.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IncludeNodes
all()
Get a node inclusion policy that includes all nodes as the base-line for further configuration.protected Iterable<Node>
doGetAll(Transaction tx)
Simply get all possibleEntity
s from the tx, not worrying whether they are included by this policy or not.protected IncludeNodes
newInstance(DetachedPropertiesDescription propertiesDescription)
Create a new instance of this policy reconfigured with a different properties description.protected IncludeNodes
newInstance(String label)
Create a new instance of this policy with the given label.-
Methods inherited from class com.graphaware.common.policy.inclusion.fluent.BaseIncludeNodes
equals, getLabel, hashCode, include, with, with
-
Methods inherited from class com.graphaware.common.policy.inclusion.fluent.IncludeEntities
getPropertiesDescription, with
-
Methods inherited from class com.graphaware.common.policy.inclusion.BaseEntityInclusionPolicy
getAll
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.graphaware.common.policy.inclusion.EntityInclusionPolicy
getAll
-
-
-
-
Constructor Detail
-
IncludeNodes
protected IncludeNodes(String label, DetachedPropertiesDescription propertiesDescription)
Create a new policy.- Parameters:
label
- that matching nodes must have, can be null for all labels.propertiesDescription
- of the matching nodes.
-
-
Method Detail
-
all
public static IncludeNodes all()
Get a node inclusion policy that includes all nodes as the base-line for further configuration. Note that if you want to simply include all nodes, it is more efficient to useIncludeAllNodes
.- Returns:
- a policy including all nodes.
-
newInstance
protected IncludeNodes newInstance(String label)
Description copied from class:BaseIncludeNodes
Create a new instance of this policy with the given label.- Specified by:
newInstance
in classBaseIncludeNodes<IncludeNodes>
- Parameters:
label
- of the new policy.- Returns:
- new policy.
-
newInstance
protected IncludeNodes newInstance(DetachedPropertiesDescription propertiesDescription)
Description copied from class:IncludeEntities
Create a new instance of this policy reconfigured with a different properties description.- Specified by:
newInstance
in classIncludeEntities<IncludeNodes,Node>
- Parameters:
propertiesDescription
- of the new instance.- Returns:
- new instance.
-
doGetAll
protected Iterable<Node> doGetAll(Transaction tx)
Description copied from class:BaseEntityInclusionPolicy
Simply get all possibleEntity
s from the tx, not worrying whether they are included by this policy or not.- Specified by:
doGetAll
in classBaseEntityInclusionPolicy<Node>
- Parameters:
tx
- to get entities from.- Returns:
- all entities.
-
-