Class BooleanExpression
- java.lang.Object
-
- org.ametys.plugins.repository.query.expression.BooleanExpression
-
- All Implemented Interfaces:
Expression
public class BooleanExpression extends Object implements Expression
Constructs anExpression
corresponding to the boolean comparison with a metadata.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ametys.plugins.repository.query.expression.Expression
Expression.Operator
-
-
Field Summary
Fields Modifier and Type Field Description private MetadataExpression
_metadata
private Expression.Operator
_operator
private boolean
_value
-
Constructor Summary
Constructors Constructor Description BooleanExpression(String metadata, boolean value)
Creates the comparison Expression.BooleanExpression(String metadata, boolean value, boolean unversioned)
Creates the comparison Expression.BooleanExpression(String metadata, Expression.Operator operator, boolean value)
Creates the comparison Expression.BooleanExpression(String metadata, Expression.Operator operator, boolean value, boolean unversioned)
Creates the comparison Expression.
-
-
-
Field Detail
-
_value
private boolean _value
-
_metadata
private MetadataExpression _metadata
-
_operator
private Expression.Operator _operator
-
-
Constructor Detail
-
BooleanExpression
public BooleanExpression(String metadata, boolean value)
Creates the comparison Expression.- Parameters:
metadata
- the metadata namevalue
- the boolean value
-
BooleanExpression
public BooleanExpression(String metadata, Expression.Operator operator, boolean value)
Creates the comparison Expression.- Parameters:
metadata
- the metadata nameoperator
- the operator to make the comparisonvalue
- the boolean value
-
BooleanExpression
public BooleanExpression(String metadata, boolean value, boolean unversioned)
Creates the comparison Expression.- Parameters:
metadata
- the metadata namevalue
- the boolean valueunversioned
- true if the metadata is unversioned, false otherwise.
-
BooleanExpression
public BooleanExpression(String metadata, Expression.Operator operator, boolean value, boolean unversioned)
Creates the comparison Expression.- Parameters:
metadata
- the metadata nameoperator
- the operator to make the comparisonvalue
- the boolean valueunversioned
- true if the metadata is unversioned, false otherwise.
-
-
Method Detail
-
build
public String build()
Description copied from interface:Expression
Build the expression.- Specified by:
build
in interfaceExpression
- Returns:
- The XPath view of the expression.
-
-