Class AbstractValueNode<T>
- java.lang.Object
-
- org.xwiki.notifications.filters.expression.generics.AbstractNode
-
- org.xwiki.notifications.filters.expression.generics.AbstractValueNode<T>
-
- Type Parameters:
T
- the type of the contained value
- All Implemented Interfaces:
ExpressionNode
- Direct Known Subclasses:
BooleanValueNode
,ConcatNode
,DateValueNode
,EntityReferenceNode
,PropertyValueNode
,StringValueNode
public abstract class AbstractValueNode<T> extends AbstractNode
Define a node that contains a specific value accessible withgetContent()
.- Since:
- 9.7RC1
- Version:
- $Id: 96ca270651a85d4bc990a1a7d5b442fd02911d94 $
-
-
Field Summary
-
Fields inherited from class org.xwiki.notifications.filters.expression.generics.AbstractNode
EMPTY_NODE
-
-
Constructor Summary
Constructors Constructor Description AbstractValueNode(T content)
Constructs a new Value Node.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConcatNode
concat(AbstractValueNode node)
Helper that allows to createConcatNode
without having to instantiate new objects.EndsWith
endsWith(AbstractValueNode node)
Helper that allows to createEndsWith
without having to instantiate new objects.EqualsNode
eq(AbstractValueNode node)
Helper method used to easily create expressions such as "VALUE1 = VALUE2" without having to instantiate new objects.boolean
equals(Object o)
T
getContent()
GreaterThanNode
greaterThan(AbstractValueNode node)
Helper that allows to createGreaterThanNode
without having to instantiate new objects.int
hashCode()
InNode
in(Collection<AbstractValueNode> values)
Helper that allows to createInNode
without having to instantiate new objects.InNode
inStrings(Collection<String> values)
Helper that allows to createInNode
without having to instantiate new objects.InSubQueryNode
inSubQuery(String subQuery, Map<String,Object> parameters)
Helper that allows to createInSubQueryNode
without having to instantiate new objects.LesserThanNode
lesserThan(AbstractValueNode node)
Helper that allows to createLesserThanNode
without having to instantiate new objects.NotEqualsNode
notEq(AbstractValueNode node)
Just aseq(AbstractValueNode)
, this method is a helper to create expressions without having to instantiate new objects.StartsWith
startsWith(AbstractValueNode node)
Helper that allows to createStartsWith
without having to instantiate new objects.
-
-
-
Constructor Detail
-
AbstractValueNode
public AbstractValueNode(T content)
Constructs a new Value Node.- Parameters:
content
- the node content
-
-
Method Detail
-
eq
public EqualsNode eq(AbstractValueNode node)
Helper method used to easily create expressions such as "VALUE1 = VALUE2" without having to instantiate new objects. Note that the method is called "eq" in order not to be confused with the standardequals(Object)
.- Parameters:
node
- the node that will be the second operand of the equals- Returns:
- an
EqualsNode
that has the current object as the fist operand, and the parameter as the second operand - Since:
- 9.8RC1
-
notEq
public NotEqualsNode notEq(AbstractValueNode node)
Just aseq(AbstractValueNode)
, this method is a helper to create expressions without having to instantiate new objects.- Parameters:
node
- the node that will be the second operand of the "not equals" node- Returns:
- a
NotEqualsNode
composed of the current object as the first operand and the parameter as the second operand - Since:
- 9.8RC1
-
startsWith
public StartsWith startsWith(AbstractValueNode node)
Helper that allows to createStartsWith
without having to instantiate new objects.- Parameters:
node
- the node that will be the second operand of the "like" node- Returns:
- a
StartsWith
where the current object is the first operand and the parameter is the second operand - Since:
- 9.8RC1
-
endsWith
public EndsWith endsWith(AbstractValueNode node)
Helper that allows to createEndsWith
without having to instantiate new objects.- Parameters:
node
- the node that will be the second operand of the "like" node- Returns:
- a
StartsWith
where the current object is the first operand and the parameter is the second operand - Since:
- 10.2, 9.11.4
-
greaterThan
public GreaterThanNode greaterThan(AbstractValueNode node)
Helper that allows to createGreaterThanNode
without having to instantiate new objects.- Parameters:
node
- the node that will be the second operand of the ">=" node- Returns:
- a
GreaterThanNode
where the current object is the first operand and the parameter is the second operand - Since:
- 9.9RC1
-
lesserThan
public LesserThanNode lesserThan(AbstractValueNode node)
Helper that allows to createLesserThanNode
without having to instantiate new objects.- Parameters:
node
- the node that will be the second operand of the "<=" node- Returns:
- a
LesserThanNode
where the current object is the first operand and the parameter is the second operand - Since:
- 9.9RC1
-
in
public InNode in(Collection<AbstractValueNode> values)
Helper that allows to createInNode
without having to instantiate new objects.- Parameters:
values
- a collection of nodes- Returns:
- a
InNode
where the current object is the first operand and the parameter is the second operand - Since:
- 9.10RC1
-
inStrings
public InNode inStrings(Collection<String> values)
Helper that allows to createInNode
without having to instantiate new objects.- Parameters:
values
- a collection of string- Returns:
- a
InNode
where the current object is the first operand and the parameter is the second operand - Since:
- 9.10RC1
-
inSubQuery
public InSubQueryNode inSubQuery(String subQuery, Map<String,Object> parameters)
Helper that allows to createInSubQueryNode
without having to instantiate new objects.- Parameters:
subQuery
- the sub query in plain HQL languageparameters
- the named parameters for the sub query- Returns:
- a
InSubQueryNode
where the current object is the first operand and the sub query is the second operand - Since:
- 10.8RC1, 9.11.8
-
concat
public ConcatNode concat(AbstractValueNode node)
Helper that allows to createConcatNode
without having to instantiate new objects.- Parameters:
node
- the node that will be the second operand of the concat- Returns:
- an
ConcatNode
that has the current object as the fist operand, and the parameter as the second operand - Since:
- 10.8RC1, 9.11.8
-
getContent
public T getContent()
- Returns:
- the node content
-
-