Class StringStartsWithExpression
- java.lang.Object
-
- org.ametys.plugins.userdirectory.expression.StringStartsWithExpression
-
- All Implemented Interfaces:
Expression
public class StringStartsWithExpression extends Object implements Expression
Constructs anExpressioncorresponding to the starting with comparison with a metadata, meaning that theExpressionwill search metadata starting with the specified value.
-
-
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_caseInsensitiveprivate MetadataExpression_metadataprivate String_value
-
Constructor Summary
Constructors Constructor Description StringStartsWithExpression(String metadata, String value, boolean caseInsensitive)Creates the comparison Expression.StringStartsWithExpression(String metadata, String value, boolean caseInsensitive, boolean unversioned)Creates the comparison Expression.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private String_escapeValue(String value)Stringbuild()Build the expression.
-
-
-
Field Detail
-
_metadata
private MetadataExpression _metadata
-
_caseInsensitive
private boolean _caseInsensitive
-
-
Constructor Detail
-
StringStartsWithExpression
public StringStartsWithExpression(String metadata, String value, boolean caseInsensitive)
Creates the comparison Expression.- Parameters:
metadata- the metadata name.value- the String value.caseInsensitive-trueif the search must be case insensitive.
-
StringStartsWithExpression
public StringStartsWithExpression(String metadata, String value, boolean caseInsensitive, boolean unversioned)
Creates the comparison Expression.- Parameters:
metadata- the metadata name.value- the String value.caseInsensitive-trueif the search must be case insensitive.unversioned- true if the metadata is unversioned, false otherwise.
-
-
Method Detail
-
build
public String build()
Description copied from interface:ExpressionBuild the expression.- Specified by:
buildin interfaceExpression- Returns:
- The XPath view of the expression.
-
_escapeValue
private String _escapeValue(String value)
-
-