Interface JKCaller


public interface JKCaller
This interface defines a contract for objects that represent database callable statements.

It provides methods for defining and working with callable statements, including parameter setting, result reading, and statement generation.

Version:
1.0
Author:
Dr. Jalal H. Kiswani
  • Method Summary

    Modifier and Type
    Method
    Description
    This method gets the SQL call statement for the callable statement.
    default String
    This method generates and returns the full SQL call statement for the callable statement, including place-holders for parameters.
    int
    This method gets the count of parameters in the callable statement.
    <T> T
    This method reads and processes the results from the provided CallableStatement.
    void
    This method registers output parameters with the provided CallableStatement.
    void
    This method sets the parameters of the provided CallableStatement.
  • Method Details

    • getCall

      String getCall()
      This method gets the SQL call statement for the callable statement.
      Returns:
      the SQL call statement.
    • registerOut

      void registerOut(CallableStatement call) throws SQLException
      This method registers output parameters with the provided CallableStatement.
      Parameters:
      call - Specifies the callable statement to which output parameters are registered.
      Throws:
      SQLException - if a database access error occurs.
    • readResults

      <T> T readResults(CallableStatement call) throws SQLException
      This method reads and processes the results from the provided CallableStatement.
      Type Parameters:
      T - Specifies the type of the result.
      Parameters:
      call - Specifies the callable statement from which results are read.
      Returns:
      the result processed from the callable statement.
      Throws:
      SQLException - if a database access error occurs.
    • setParams

      void setParams(CallableStatement call) throws SQLException
      This method sets the parameters of the provided CallableStatement.
      Parameters:
      call - Specifies the callable statement for which parameters are set.
      Throws:
      SQLException - if a database access error occurs.
    • getParamsCount

      int getParamsCount()
      This method gets the count of parameters in the callable statement.
      Returns:
      the count of parameters.
    • getFullCallStatement

      default String getFullCallStatement()
      This method generates and returns the full SQL call statement for the callable statement, including place-holders for parameters.
      Returns:
      the full SQL call statement with place-holders.