public abstract class SqlFunction extends Object
Constructor and Description |
---|
SqlFunction() |
Modifier and Type | Method and Description |
---|---|
abstract Object |
apply(SqlFunctionExecutionContext context)
Defines the action to be performed on the stored object.
|
protected void |
assertNumberOfArguments(int minExpected,
int maxExpected,
SqlFunctionExecutionContext context)
Validate the number of arguments a function receives is in a given range.
|
protected void |
assertNumberOfArguments(int expected,
SqlFunctionExecutionContext context)
Validate the number of arguments a function receives.
|
protected Class<?> |
fromSqlTypeName(String sqlTypeName,
Class<?> def) |
protected boolean |
isString(Object object) |
protected boolean |
isWholeNumber(Object object) |
public abstract Object apply(SqlFunctionExecutionContext context)
context
- contains the arguments, SqlFunctionExecutionContext
RuntimeException
- if wrong input arguments were suppliedprotected void assertNumberOfArguments(int expected, SqlFunctionExecutionContext context)
expected
- number of arguments, according to every function inner logic.context
- the actual received arguments, which are contained in the context.RuntimeException
- if expected doesn't match actual number of arguments in contextprotected void assertNumberOfArguments(int minExpected, int maxExpected, SqlFunctionExecutionContext context)
minExpected
- minimum number of arguments, according to every function inner logic.maxExpected
- maximum number of arguments, according to every function inner logic.context
- the actual received arguments, which are contained in the context.RuntimeException
- if expected doesn't match actual number of arguments in contextprotected boolean isWholeNumber(Object object)
protected boolean isString(Object object)
Copyright © GigaSpaces.