|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FreeformStatementDelegate
FreeformStatementDelegate is an extension to FreeformQueryDelegate that provides definitions for methods that produce StatementHelper objects instead of basic query strings. This allows the FreeformQuery query delegate to use PreparedStatements instead of regular Statement when accessing the database. Due to the injection protection and other benefits of prepared statements, it is advisable to implement this interface instead of the FreeformQueryDelegate whenever possible.
Method Summary | |
---|---|
StatementHelper |
getContainsRowQueryStatement(java.lang.Object... keys)
Should return a new instance of StatementHelper that contains the query string and parameter values required to create a PreparedStatement used by the FreeformQuery.containsRowWithKeys() method. |
StatementHelper |
getCountStatement()
Should return a new instance of StatementHelper that contains the query string and parameter values required to create a PreparedStatement that will fetch the row count from the DB. |
StatementHelper |
getQueryStatement(int offset,
int limit)
Should return a new instance of StatementHelper that contains the query string and parameter values required to create a PreparedStatement. |
Methods inherited from interface com.vaadin.data.util.sqlcontainer.query.FreeformQueryDelegate |
---|
getContainsRowQueryString, getCountQuery, getQueryString, removeRow, setFilters, setOrderBy, storeRow |
Method Detail |
---|
StatementHelper getQueryStatement(int offset, int limit) throws java.lang.UnsupportedOperationException
offset
- the first record (row) to fetch.pagelength
- the number of records (rows) to fetch. 0 means all records
starting from offset.
java.lang.UnsupportedOperationException
StatementHelper getCountStatement() throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException
StatementHelper getContainsRowQueryStatement(java.lang.Object... keys) throws java.lang.UnsupportedOperationException
keys
- the values of the primary keys
java.lang.UnsupportedOperationException
- to use the default logic in FreeformQuery
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |