Class StatementHelper

  • All Implemented Interfaces:
    Serializable

    public class StatementHelper
    extends Object
    implements Serializable
    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:
    Serialized Form
    • 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)
      • handleUnrecognizedTypeNullValue

        protected boolean handleUnrecognizedTypeNullValue​(int i,
                                                          PreparedStatement pstmt,
                                                          Map<Integer,​Class<?>> dataTypes)
                                                   throws SQLException
        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.
        Parameters:
        i -
        pstmt -
        dataTypes2 -
        Returns:
        true if handled, false otherwise
        Throws:
        SQLException