Interface SqlControl

    • 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
      • getDynamicUpdateValues

        Object getDynamicUpdateValues()
        The object used for the SQL update statement dynamic input values. This enables to split input values into value used for WHERE fragment and for UPDATE fragment of the SQL statement. In the case this parameter is null, the dynamicInputValues parameter for SqlCrudEngine.update(SqlSession, Object, SqlControl) holds all input values.
        Returns:
        the object used for the SQL update statement dynamic input values (UPDATE fragment)
      • getMaxTimeout

        Integer 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

        Integer 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

        Integer 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

        Integer 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
      • getSkipEmptyStatement

        Boolean getSkipEmptyStatement()
        Returns the indicator, that an empty INSERT or UPDATE statement execution should be ignored (for example update statement without any bounded input values).
        Returns:
        the indicator, that an empty INSERT or UPDATE statement execution should be ignored
      • getLowLevelSqlCallback

        SqlControl.LowLevelSqlCallback getLowLevelSqlCallback()
        Returns the low level SQL callback handler
        Returns:
        the low level SQL callback handler
      • getSqlExecutionCallback

        SqlControl.SqlExecutionCallback getSqlExecutionCallback()
        Returns the SQL command execution callback handler
        Returns:
        the SQL command execution callback handler
      • getSqlName

        String getSqlName()
        Returns the name of the required SQL Query Engine instance
        Returns:
        the name of the required SQL Query Engine instance