public interface SearchFunctionHandler
CmSearchFunctionDefinition
object that defines a particular custom search function. Custom search functions are used in the
SELECT list of Content Engine SQL queries.Modifier and Type | Method and Description |
---|---|
java.lang.Object |
evaluate(CmSearchFunctionDefinition definition,
java.lang.Object[] parameters)
This method is called once for each search result row, after security filtering but before processing,
to evaluate the custom function for that result row.
|
java.lang.String |
getFunctionName()
Returns the case-insensitive name of the custom function as it must be entered in a Content Engine
SQL query.
|
boolean |
requiresTransaction()
This method is called once during a search to determine if the custom function will need to be executed in a
distributed transaction by the server.
|
java.lang.Class |
validate(CmSearchFunctionDefinition definition,
java.lang.Class[] parameterTypes)
This method is called once during a search to determine if the custom function is being used correctly
by verifying that the custom function is called with the correct number of parameters and the correct types
for the parameters.
|
java.lang.String getFunctionName()
boolean requiresTransaction()
True
if any work will be performed that needs to be executed atomically; otherwise,
the method returns false
.java.lang.Class validate(CmSearchFunctionDefinition definition, java.lang.Class[] parameterTypes)
Class
objects that represent property value data types.
The return data type cannot be either of the object collection types (IndependentObjectSet.class
or DependentObjectList.class
).True
if the custom function is being used correctly; otherwise, returns false
.EngineRuntimeException
- An exception is thrown if the number of parameters is incorrect or
any parameter is of an incorrect data type. The exception that is thrown is returned to the caller of the
fetchRows()
method.java.lang.Object evaluate(CmSearchFunctionDefinition definition, java.lang.Object[] parameters)
Class
objects that are passed to the
validate()
method. Likewise, the object that is returned must correspond to the Class
object that is returned by the validate()
method.EngineRuntimeException
- A runtime exception is thrown if an error condition is detected.© Copyright IBM Corporation 2006, 2015. All rights reserved.