Class ReadQueryTemplate

java.lang.Object
rife.database.queries.ReadQueryTemplate
All Implemented Interfaces:
Query, ReadQuery

public class ReadQueryTemplate extends Object implements ReadQuery
An instance of ReadQueryTemplate will obtain a SQL from a Template block. If the template is provided but no block name, the entire content of the template will be used as the SQL query.

This allows you to write your custom SQL queries in dedicated templates, to name them, and to use them together with the functionalities that are provided by DbQueryManager

Since:
1.0
  • Constructor Details

    • ReadQueryTemplate

      public ReadQueryTemplate()
      Creates a new empty instance of ReadQueryTemplate.
      Since:
      1.0
    • ReadQueryTemplate

      public ReadQueryTemplate(Template template)
      Creates a new instance of ReadQueryTemplate with the template instance whose content provides the SQL query that will be executed.
      Parameters:
      template - the template instance
      Since:
      1.0
    • ReadQueryTemplate

      public ReadQueryTemplate(Template template, String block)
      Creates a new instance of ReadQueryTemplate with the template instance and block name that provide the SQL that will be executed.
      Parameters:
      template - the template instance
      block - the name of the template block
      Since:
      1.0
  • Method Details