sf logo

sf.qof.dialect
Interface SQLDialect

All Known Implementing Classes:
DefaultDialect, HSQLDbDialect, OracleDialect

public interface SQLDialect

Specifies database specific SQL dialects. This interface can be implemented to use database specific SQL syntax for example to implement paging.

See Also:
Paging

Method Summary
 String getLimitString(String sql, boolean hasOffset)
          Returns a modified SQL select statement that allows limiting the number of rows returned.
 boolean limitAddOffset()
          Returns true if the offset needs to be added to maximum number of rows.
 boolean limitOffsetFirst()
          Returns true if the offset parameter is in front of the maximum number of rows parameter.
 boolean limitParametersBeforeQueryParameters()
          Returns true is the parameters to set the maximum number of rows and optionally the offset are the first parameters in the prepared select statement.
 

Method Detail

getLimitString

String getLimitString(String sql,
                      boolean hasOffset)
Returns a modified SQL select statement that allows limiting the number of rows returned. This is used to implement paging.

If hasOffset is true the SQL select statement that is returned must allow to set an offset as well as the number of rows.

Parameters:
sql - the select SQL statement
hasOffset - true is an offset should be set
Returns:
the modified SQL statement
See Also:
Paging, limitParametersBeforeQueryParameters(), limitAddOffset(), limitOffsetFirst()

limitParametersBeforeQueryParameters

boolean limitParametersBeforeQueryParameters()
Returns true is the parameters to set the maximum number of rows and optionally the offset are the first parameters in the prepared select statement. This is used to implement paging.

Returns:
true if limitation parameters are before the query parameters

limitAddOffset

boolean limitAddOffset()
Returns true if the offset needs to be added to maximum number of rows. This is used to implement paging.

Returns:
true if offset and maximum number of rows need to added

limitOffsetFirst

boolean limitOffsetFirst()
Returns true if the offset parameter is in front of the maximum number of rows parameter. This is used to implement paging.

Returns:
true if offset is set first

sf logo

Copyright © 2007 brunella ltd. All Rights Reserved.