Class UserDefined
- java.lang.Object
-
- org.teiid.query.function.aggregate.AggregateFunction
-
- org.teiid.query.function.aggregate.UserDefined
-
public class UserDefined extends AggregateFunction
-
-
Field Summary
-
Fields inherited from class org.teiid.query.function.aggregate.AggregateFunction
argIndexes
-
-
Constructor Summary
Constructors Constructor Description UserDefined(FunctionDescriptor functionDescriptor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddInputDirect(List<?> tuple, CommandContext commandContext)Called for the element value in every row of a group.ObjectgetResult(CommandContext commandContext)Called after all values have been processed to get the result.voidgetState(List<Object> state)List<? extends Class<?>>getStateTypes()voidreset()Called to reset the state of the function.booleanrespectsNull()intsetState(List<?> state, int index)-
Methods inherited from class org.teiid.query.function.aggregate.AggregateFunction
addInput, filter, getArgIndexes, getOutputType, initialize, setArgIndexes, setConditionIndex
-
-
-
-
Constructor Detail
-
UserDefined
public UserDefined(FunctionDescriptor functionDescriptor) throws FunctionExecutionException
- Throws:
FunctionExecutionException
-
-
Method Detail
-
addInputDirect
public void addInputDirect(List<?> tuple, CommandContext commandContext) throws TeiidComponentException, TeiidProcessingException
Description copied from class:AggregateFunctionCalled for the element value in every row of a group.- Specified by:
addInputDirectin classAggregateFunction- Throws:
TeiidProcessingExceptionTeiidComponentException
-
reset
public void reset()
Description copied from class:AggregateFunctionCalled to reset the state of the function.- Specified by:
resetin classAggregateFunction
-
getResult
public Object getResult(CommandContext commandContext) throws FunctionExecutionException, ExpressionEvaluationException, TeiidComponentException, TeiidProcessingException
Description copied from class:AggregateFunctionCalled after all values have been processed to get the result.- Specified by:
getResultin classAggregateFunction- Returns:
- Result value
- Throws:
TeiidProcessingExceptionFunctionExecutionExceptionExpressionEvaluationExceptionTeiidComponentException
-
respectsNull
public boolean respectsNull()
- Overrides:
respectsNullin classAggregateFunction
-
getStateTypes
public List<? extends Class<?>> getStateTypes()
- Overrides:
getStateTypesin classAggregateFunction
-
getState
public void getState(List<Object> state)
- Overrides:
getStatein classAggregateFunction
-
setState
public int setState(List<?> state, int index)
- Overrides:
setStatein classAggregateFunction
-
-