We use cookies to serve our customers and website visitors in the best possible way. Cookies are used for the proper functioning of the website and for improving the user experience, monitoring visitor traffic and marketing purposes. By continuing to browse the site, you agree to our use of cookies. You can read more about cookies here.
com.vaadin.data.util.sqlcontainer.query.generator.
Class StatementHelper
java.lang.Object
com.vaadin.data.util.sqlcontainer.query.generator.StatementHelper
All Implemented Interfaces:
- extends Object
- implements Serializable
public class StatementHelper
StatementHelper is a simple helper class that assists TableQuery and the query generators in filling a PreparedStatement. The actual statement is generated by the query generator methods, but the resulting statement and all the parameter values are stored in an instance of StatementHelper. This class will also fill the values with correct setters into the PreparedStatement on request.
See Also:
Constructor Summary | |
---|---|
StatementHelper()
|
Method Summary | |
---|---|
void |
addParameterValue(Object parameter)
|
void |
addParameterValue(Object parameter,
Class<?> type)
|
String |
getQueryString()
|
protected boolean |
handleUnrecognizedTypeNullValue(int i,
PreparedStatement pstmt,
Map<Integer,Class<?>> dataTypes)
Handle unrecognized null values. |
void |
setParameterValuesToStatement(PreparedStatement pstmt)
|
void |
setQueryString(String queryString)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
StatementHelper
public StatementHelper()
Method Detail |
---|
setQueryString
public void setQueryString(String queryString)
getQueryString
public String getQueryString()
addParameterValue
public void addParameterValue(Object parameter)
addParameterValue
public void addParameterValue(Object parameter,
Class<?> type)
setParameterValuesToStatement
public void setParameterValuesToStatement(PreparedStatement pstmt)
throws SQLException
- Throws:
SQLException
handleUnrecognizedTypeNullValue
protected boolean handleUnrecognizedTypeNullValue(int i,
PreparedStatement pstmt,
Map<Integer,Class<?>> dataTypes)
throws SQLException
- Parameters:
i
-pstmt
-dataTypes2
-- Returns:
- true if handled, false otherwise
- Throws:
SQLException
- See Also:
http://dev.vaadin.com/ticket/9148}
Handle unrecognized null values. Override this to handle null values for
platform specific data types that are not handled by the default
implementation of the StatementHelper
.