org.sqlproc.engine
Interface SqlControl

All Known Implementing Classes:
SqlStandardControl

public interface SqlControl

The compound parameters controlling the META SQL execution.

For more info please see the Tutorials.

Author:
Vladimir Hudec

Method Summary
 Map<String,Object> getFeatures()
          Returns the optional features.
 int getFetchSize()
          Returns the fetch size of SQL execution output rows, which can be returned in one SQL statement.
 int getFirstResult()
          Returns the first SQL execution output row to be returned in the case we need to skip some rows in the result set.
 int getMaxResults()
          Returns the max number of SQL execution output rows, which can be returned in the result list.
 int getMaxTimeout()
          Returns the max SQL execution time.
 Map<String,Class<?>> getMoreResultClasses()
          Returns more result classes used for the return values, like the collections classes or the collections items.
 SqlOrder getOrder()
          Returns the ordering directive list.
 String getProcessingId()
          Returns the unique ID of the executed statement based on the input values combination.
 Object getStaticInputValues()
          Returns the object used for the SQL statement static input values.
 

Method Detail

getStaticInputValues

Object getStaticInputValues()
Returns the object used for the SQL statement static input values. The class of this object is also named as the input class or the static parameters class. The exact class type isn't important, all the parameters injected into the SQL query command are picked up using the reflection API. Compared to dynamicInputValues input parameters, parameters in this class should't be produced by an end user to prevent SQL injection threat!

Returns:
the object used for the SQL statement static input values

getMaxTimeout

int getMaxTimeout()
Returns the max SQL execution time. This parameter can help to protect production system against ineffective SQL query commands. The value is in milliseconds.

Returns:
the max SQL execution time

getFirstResult

int getFirstResult()
Returns 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.

Returns:
the first SQL execution output row

getMaxResults

int getMaxResults()
Returns the max number of SQL execution output rows, which can be returned in the result list. The primary usage is to support the pagination.

Returns:
the max number of SQL execution output rows

getOrder

SqlOrder getOrder()
Returns the ordering directive list. Using the class SqlOrder the ordering rules can be chained. Every ordering rule in this chain should correspond to one META SQL ordering statement.

Returns:
the ordering directive list

getMoreResultClasses

Map<String,Class<?>> getMoreResultClasses()
Returns more result classes used for the return values, like the collections classes or the collections items. They are used mainly for the one-to-one, one-to-many and many-to-many associations.

Returns:
more result classes used for the return values

getFeatures

Map<String,Object> getFeatures()
Returns the optional features. These features are defined in the statement execution scope. In the case of conflict with the optional features defined in sthe statement/global scope, their priority is higher.

Returns:
the optional features

getProcessingId

String getProcessingId()
Returns the unique ID of the executed statement based on the input values combination. This ID can be used for the caching purposes to optimize the SqlMetaStatement.process(org.sqlproc.engine.impl.SqlMetaStatement.Type, Object, SqlControl, SqlEngine) The generation of the final ANSI SQL statement from the META SQL statement is influenced by the input values. This ID is an indicator of the uniqueness these input values. For more info please see the tutorials.

Returns:
the unique ID of the executed statement based on the input values combination

getFetchSize

int getFetchSize()
Returns the fetch size of SQL execution output rows, which can be returned in one SQL statement.

Returns:
the fetch size of SQL execution output rows


Copyright © 2015. All rights reserved.