Class CallStoredProcedure


  • public class CallStoredProcedure
    extends Object
    This class is a service class to directly call a stored procedure without using a ProcessInstance.
    Author:
    mtaal
    • Constructor Detail

      • CallStoredProcedure

        public CallStoredProcedure()
    • Method Detail

      • call

        public Object call​(String name,
                           List<Object> parameters,
                           List<Class<?>> types,
                           boolean doFlush,
                           boolean returnResults)
        Calls a stored procedure with the specified name. The parameter list is translated in exactly the same parameters for the call so the parameters should be in the correct order and have the correct type as expected by the stored procedure. The parameter types can be any of the primitive types used by Openbravo (Date, Long, String, etc.).
        Parameters:
        name - the name of the stored procedure to call.
        parameters - a list of parameters (null values are allowed)
        types - the list of types of the parameters, only needs to be set if there are null values and if the null value is something else than a String (which is handled as a default type)
        doFlush - do flush before calling stored procedure
        returnResults - whether a fetch for results should be done after the call to the stored procedure (essentially describes whether the PL object is a procedure or function)
        Returns:
        the stored procedure result.