Interface JKFinder

All Superinterfaces:
JKDBOperation
All Known Implementing Classes:
JKFinderAdapter

public interface JKFinder extends JKDBOperation
This interface is used to define database query finders within the JK framework.

It extends the JKDBOperation interface, indicating its role in database operations.

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

    Modifier and Type
    Method
    Description
    This method gets the SQL query string associated with this finder.
    default Boolean
    This method checks if the database operation is multi-tenant.
    <T> T
    This method populates objects from a ResultSet after executing the query defined by this finder.
    void
    This method sets any required parameters in a PreparedStatement before query execution.
  • Method Details

    • getQuery

      String getQuery()
      This method gets the SQL query string associated with this finder.
      Returns:
      the SQL query string.
    • populate

      <T> T populate(ResultSet rs) throws SQLException
      This method populates objects from a ResultSet after executing the query defined by this finder.
      Type Parameters:
      T - Specifies the type of objects.
      Parameters:
      rs - Specifies the ResultSet containing query results.
      Returns:
      the object populated with data from the ResultSet.
      Throws:
      SQLException - if a database access error occurs.
    • setParameters

      void setParameters(PreparedStatement ps) throws SQLException
      This method sets any required parameters in a PreparedStatement before query execution.
      Parameters:
      ps - Specifies the PreparedStatement to set parameters on.
      Throws:
      SQLException - if a database access error occurs.
    • isMultiTenant

      default Boolean isMultiTenant()
      This method checks if the database operation is multi-tenant.
      Returns:
      true if the operation is multi-tenant, false otherwise.