Class StringExpression
- java.lang.Object
-
- org.ametys.plugins.repository.query.expression.StringExpression
-
- All Implemented Interfaces:
Expression
public class StringExpression extends Object implements Expression
Constructs anExpression
corresponding to the String 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 boolean
_caseInsensitive
private MetadataExpression
_metadata
private Expression.Operator
_operator
private String
_value
-
Constructor Summary
Constructors Constructor Description StringExpression(String metadata, Expression.Operator operator, String value)
Creates the comparison Expression.StringExpression(String metadata, Expression.Operator operator, String value, boolean unversioned)
Creates the comparison Expression.StringExpression(String metadata, Expression.Operator operator, String value, boolean unversioned, boolean caseInsensitive)
Creates the comparison Expression.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private String
_escapeValue(String value)
String
build()
Build the expression.
-
-
-
Field Detail
-
_metadata
private MetadataExpression _metadata
-
_operator
private Expression.Operator _operator
-
_caseInsensitive
private boolean _caseInsensitive
-
-
Constructor Detail
-
StringExpression
public StringExpression(String metadata, Expression.Operator operator, String value)
Creates the comparison Expression.- Parameters:
metadata
- the metadata nameoperator
- the operator to make the comparisonvalue
- the String value
-
StringExpression
public StringExpression(String metadata, Expression.Operator operator, String value, boolean unversioned)
Creates the comparison Expression.- Parameters:
metadata
- the metadata nameoperator
- the operator to make the comparisonvalue
- the String valueunversioned
- true if the metadata is unversioned, false otherwise.
-
StringExpression
public StringExpression(String metadata, Expression.Operator operator, String value, boolean unversioned, boolean caseInsensitive)
Creates the comparison Expression.- Parameters:
metadata
- the metadata nameoperator
- the operator to make the comparisonvalue
- the String valueunversioned
- true if the metadata is unversioned, false otherwise.caseInsensitive
-true
if the search must be case insensitive.
-
-
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.
-
_escapeValue
private String _escapeValue(String value)
-
-