Interface SqlFunctionBuilder
-
public interface SqlFunctionBuilder
A builder used to configure and build a new SqlFunction. The builder is a throwaway-object; you can only build a single SqlFunction using the same builder.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SqlFunctionBuilder
attribute(Expression attribute)
Sets the attribute which will be used to parameterize the function.SqlFunctionBuilder
attribute(String externalKey)
Sets the attribute which will be used to parameterize the function.SqlStringFunction
buildReturningClob()
Creates an expression that can be used to call the specified function as part of a ContentQuery.SqlDateFunction
buildReturningDate()
Creates an expression that can be used to call the specified function as part of a ContentQuery.SqlNumberFunction
buildReturningNumber()
Creates an expression that can be used to call the specified function as part of a ContentQuery.SqlStringFunction
buildReturningVarchar()
Creates an expression that can be used to call the specified function as part of a ContentQuery.SqlFunctionBuilder
externalKey(String externalKey)
Set the name to be used when referring to this SqlFunction from client code.SqlFunctionBuilder
function(String sqlFunctionName)
Sets the name of the database function name to be called to fetch data for this SqlFunction.
-
-
-
Method Detail
-
externalKey
SqlFunctionBuilder externalKey(String externalKey)
Set the name to be used when referring to this SqlFunction from client code. You may use this name as the externalKey in an ObjectReference when needed.- Parameters:
externalKey
- the externalKey to use for the SqlFunction- Returns:
- this SqlFunctionBuilder
-
function
SqlFunctionBuilder function(String sqlFunctionName)
Sets the name of the database function name to be called to fetch data for this SqlFunction. The signature of the function is specified by the database repository, and is the same as for iKnowBase Classic database functions.- Parameters:
sqlFunctionName
- the name of the function- Returns:
- this SqlFunctionBuilder
-
attribute
SqlFunctionBuilder attribute(String externalKey)
Sets the attribute which will be used to parameterize the function. If this value is set, the database will fetch the value of this attribute and pass the value to this function.- Parameters:
externalKey
- the externalKey of the attribute to parameterize on- Returns:
- this SqlFunctionBuilder
-
attribute
SqlFunctionBuilder attribute(Expression attribute)
Sets the attribute which will be used to parameterize the function. If this value is set, the database will fetch the value of this attribute and pass the value to this function.- Parameters:
attribute
- an Expression retferring to the attribute to parameterize on- Returns:
- this SqlFunctionBuilder
-
buildReturningVarchar
SqlStringFunction buildReturningVarchar()
Creates an expression that can be used to call the specified function as part of a ContentQuery. This particular build-function creates a StringExpressionType, which lets the ContentQueryRow return the proper value type.- Returns:
- an expression object that can be used in a ContentQuery
-
buildReturningClob
SqlStringFunction buildReturningClob()
Creates an expression that can be used to call the specified function as part of a ContentQuery. This particular build-function creates a StringExpressionType, which lets the ContentQueryRow return the proper value type.- Returns:
- an expression object that can be used in a ContentQuery
-
buildReturningNumber
SqlNumberFunction buildReturningNumber()
Creates an expression that can be used to call the specified function as part of a ContentQuery. This particular build-function creates a NumberExpressionType, which lets the ContentQueryRow return the proper value type.- Returns:
- an expression object that can be used in a ContentQuery
-
buildReturningDate
SqlDateFunction buildReturningDate()
Creates an expression that can be used to call the specified function as part of a ContentQuery. This particular build-function creates a DateExpressionType, which lets the ContentQueryRow return the proper value type.- Returns:
- an expression object that can be used in a ContentQuery
-
-