JDBaccess API 1.0

com.jdbaccess.da
Interface Function

All Superinterfaces:
Call, DataAccess

public interface Function
extends Call

Interface for function calls. It extends the interface Call.

Example:
   Function function = DAReader.getFunction(t);
   function.setFunctionName("fnc_addSalaryPercent");
   function.setModuleName("pkg_employee");
   ArrayList params = new ArrayList();
   params.add(new Integer(4711));
   function.setParameters(params);
   String outputParamType = "numeric";
   function.setOutputParamType(outputParamType);
   Object addedSalary2 = function.execute(); 
   function.end();
 


Method Summary
 java.lang.Object execute()
          Execute the function.
 java.lang.String getFunctionName()
          Get the function name of the function.
 java.lang.Object getFunctionResult()
          Get the result object of the function (after execution)
 void setFunctionName(java.lang.String functionName)
          Set the function name of the function.
 void setOutputParamType(java.lang.String outputParamType)
          Set the output parameter type of the function (e.g.
 
Methods inherited from interface com.jdbaccess.da.Call
getModuleName, setModuleName, setReadLobsFull
 
Methods inherited from interface com.jdbaccess.da.DataAccess
end, getName, getObjectType, getPackageName, getSize, getSql, setName, setObjectType, setPackageName, setParameters, setSql, toString
 

Method Detail

execute

java.lang.Object execute()
                         throws ApplicationException
Execute the function.

Returns:
the result object of the function execution
Throws:
ApplicationException

getFunctionName

java.lang.String getFunctionName()
Get the function name of the function.

Returns:
Returns the function name. e.g. fnc_updateSalaryById

setFunctionName

void setFunctionName(java.lang.String functionName)
Set the function name of the function.

Parameters:
functionName - The function name to set. e.g. prc_updateSalaryById

setOutputParamType

void setOutputParamType(java.lang.String outputParamType)
Set the output parameter type of the function (e.g. "INTEGER").

Parameters:
outputParamType - The output parameter type to set. See manual for allowed types. In MySql the outputParamType is build automatically and you should not call this method.

getFunctionResult

java.lang.Object getFunctionResult()
Get the result object of the function (after execution)

Returns:
result of the executed function (first element of the output parameters of the function)

JDBaccess API 1.0

Copyright © 2005-2006 JDBaccess.com, Königsweg 210, D-14129 Berlin, Germany. All Rights Reserved.