Class StringStartsWithExpression
- java.lang.Object
-
- org.ametys.plugins.userdirectory.expression.StringStartsWithExpression
-
- All Implemented Interfaces:
Expression
public class StringStartsWithExpression extends Object implements Expression
Constructs anExpression
corresponding to the starting with comparison with a metadata, meaning that theExpression
will 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
_caseInsensitive
private MetadataExpression
_metadata
private 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)
String
build()
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
-true
if 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
-true
if 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:Expression
Build the expression.- Specified by:
build
in interfaceExpression
- Returns:
- The XPath view of the expression.
-
_escapeValue
private String _escapeValue(String value)
-
-