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 ConcatNodeconcat(AbstractValueNode node)Helper that allows to createConcatNodewithout having to instantiate new objects.EndsWithendsWith(AbstractValueNode node)Helper that allows to createEndsWithwithout having to instantiate new objects.EqualsNodeeq(AbstractValueNode node)Helper method used to easily create expressions such as "VALUE1 = VALUE2" without having to instantiate new objects.booleanequals(Object o)TgetContent()GreaterThanNodegreaterThan(AbstractValueNode node)Helper that allows to createGreaterThanNodewithout having to instantiate new objects.inthashCode()InNodein(Collection<AbstractValueNode> values)Helper that allows to createInNodewithout having to instantiate new objects.InNodeinStrings(Collection<String> values)Helper that allows to createInNodewithout having to instantiate new objects.InSubQueryNodeinSubQuery(String subQuery, Map<String,Object> parameters)Helper that allows to createInSubQueryNodewithout having to instantiate new objects.LesserThanNodelesserThan(AbstractValueNode node)Helper that allows to createLesserThanNodewithout having to instantiate new objects.NotEqualsNodenotEq(AbstractValueNode node)Just aseq(AbstractValueNode), this method is a helper to create expressions without having to instantiate new objects.StartsWithstartsWith(AbstractValueNode node)Helper that allows to createStartsWithwithout 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
EqualsNodethat 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
NotEqualsNodecomposed 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 createStartsWithwithout having to instantiate new objects.- Parameters:
node- the node that will be the second operand of the "like" node- Returns:
- a
StartsWithwhere 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 createEndsWithwithout having to instantiate new objects.- Parameters:
node- the node that will be the second operand of the "like" node- Returns:
- a
StartsWithwhere 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 createGreaterThanNodewithout having to instantiate new objects.- Parameters:
node- the node that will be the second operand of the ">=" node- Returns:
- a
GreaterThanNodewhere 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 createLesserThanNodewithout having to instantiate new objects.- Parameters:
node- the node that will be the second operand of the "<=" node- Returns:
- a
LesserThanNodewhere 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 createInNodewithout having to instantiate new objects.- Parameters:
values- a collection of nodes- Returns:
- a
InNodewhere 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 createInNodewithout having to instantiate new objects.- Parameters:
values- a collection of string- Returns:
- a
InNodewhere 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 createInSubQueryNodewithout having to instantiate new objects.- Parameters:
subQuery- the sub query in plain HQL languageparameters- the named parameters for the sub query- Returns:
- a
InSubQueryNodewhere 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 createConcatNodewithout having to instantiate new objects.- Parameters:
node- the node that will be the second operand of the concat- Returns:
- an
ConcatNodethat 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
-
-