org.sqlproc.engine.plugin
Interface SqlFromToPlugin

All Superinterfaces:
Modifiers
All Known Implementing Classes:
DefaultSqlPlugins

public interface SqlFromToPlugin
extends Modifiers

The SQL Processor plugin devoted to the FROM-TO SQL construction. The primary usage is to support the pagination. There are utilized the patterns from the SqlFeature. These pattern have to be combined with the original SQL query, the limit and the offset in the next way:

Author:
Vladimir Hudec

Nested Class Summary
static class SqlFromToPlugin.LimitType
          The characteristic of FROM and TO restrictions used in SqlQuery.list().
 
Field Summary
 
Fields inherited from interface org.sqlproc.engine.plugin.Modifiers
MODIFIER_ANY, MODIFIER_ANYSET, MODIFIER_CALL, MODIFIER_DISCRIMINATOR, MODIFIER_EMPTY, MODIFIER_GTYPE, MODIFIER_ID, MODIFIER_IDENTITY_GENERATOR, MODIFIER_IDENTITY_SELECT, MODIFIER_NOTEMPTY, MODIFIER_NOTNULL, MODIFIER_NULL, MODIFIER_SEQUENCE, MODIFIER_TYPE
 
Method Summary
 SqlFromToPlugin.LimitType limitQuery(String queryString, StringBuilder queryResult, Integer firstResult, Integer maxResults, boolean ordered)
          Used to construct the FROM-TO SQL.
 

Method Detail

limitQuery

SqlFromToPlugin.LimitType limitQuery(String queryString,
                                     StringBuilder queryResult,
                                     Integer firstResult,
                                     Integer maxResults,
                                     boolean ordered)
Used to construct the FROM-TO SQL.

Parameters:
queryString - the original ANSI SQL
queryResult - the final ANSI SQL reflected FROM and TO restrictions
firstResult - The first SQL execution output row to be returned in the case we need to skip some rows in the result set. The primary usage is to support the pagination.
maxResults - The max number of SQL execution output rows, which can be returned in the result list. The primary usage is to support the pagination.
ordered - the SQL output is sorted
Returns:
the characteristic of FROM and TO restrictions used in SqlQuery.list()


Copyright © 2014. All Rights Reserved.