Class SubstringExpression<T,R>
- java.lang.Object
-
- org.apache.qpid.server.query.engine.parsing.expression.AbstractExpressionNode<T,R>
-
- org.apache.qpid.server.query.engine.parsing.expression.function.AbstractFunctionExpression<T,java.lang.String>
-
- org.apache.qpid.server.query.engine.parsing.expression.function.string.SubstringExpression<T,R>
-
- Type Parameters:
T- Input parameter typeR- Return parameter type
- All Implemented Interfaces:
java.util.function.Function<T,java.lang.String>,Expression<T,java.lang.String>,ExpressionNode<T,java.lang.String>
public class SubstringExpression<T,R> extends AbstractFunctionExpression<T,java.lang.String>
SUBSTRING takes a source parameter, a start index parameter and optional length parameter. Returns substring of a source string from the start index to the end or using the length parameter. If source string is NULL, return NULL. If start index is negative, function extracts from the end of the string.
-
-
Field Summary
-
Fields inherited from class org.apache.qpid.server.query.engine.parsing.expression.function.AbstractFunctionExpression
_functionName
-
Fields inherited from class org.apache.qpid.server.query.engine.parsing.expression.AbstractExpressionNode
_metadata
-
-
Constructor Summary
Constructors Constructor Description SubstringExpression(java.lang.String alias, java.util.List<ExpressionNode<T,?>> args)Constructor initializes children expression list
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringapply(T value)Performs substring operation using parameters and the value supplied-
Methods inherited from class org.apache.qpid.server.query.engine.parsing.expression.function.AbstractFunctionExpression
evaluateChild, getFunctionName, getOptionalConstantParameter, getOptionalParameter, getRequiredParameter
-
Methods inherited from class org.apache.qpid.server.query.engine.parsing.expression.AbstractExpressionNode
containsAggregation, ctx, evaluateChild, getAggregations, getAlias, getChild, getChildren, getParent, isAccessor, isInstantlyEvaluable, setAlias, setParent, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.qpid.server.query.engine.parsing.expression.Expression
andThen
-
-
-
-
Constructor Detail
-
SubstringExpression
public SubstringExpression(java.lang.String alias, java.util.List<ExpressionNode<T,?>> args)Constructor initializes children expression list- Parameters:
alias- Expression aliasargs- List of children expressions
-
-
Method Detail
-
apply
public java.lang.String apply(T value)
Performs substring operation using parameters and the value supplied- Parameters:
value- Object to handle- Returns:
- Resulting string
-
-