Class NullArgument

  • All Implemented Interfaces:
    Argument

    public class NullArgument
    extends java.lang.Object
    implements Argument
    A typed SQL null argument.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.Integer sqlType  
    • Constructor Summary

      Constructors 
      Constructor Description
      NullArgument​(int sqlType)  
      NullArgument​(java.lang.Integer sqlType)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void apply​(int position, java.sql.PreparedStatement statement, StatementContext ctx)
      Apply the argument to the given prepared statement.
      java.lang.Integer getSqlType()
      Returns the Types value that is used.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • sqlType

        private final java.lang.Integer sqlType
    • Constructor Detail

      • NullArgument

        public NullArgument​(int sqlType)
        Parameters:
        sqlType - the SQL type of the Null
        See Also:
        Types
      • NullArgument

        public NullArgument​(java.lang.Integer sqlType)
        Parameters:
        sqlType - the SQL type of the Null
        See Also:
        Types
    • Method Detail

      • apply

        public void apply​(int position,
                          java.sql.PreparedStatement statement,
                          StatementContext ctx)
                   throws java.sql.SQLException
        Description copied from interface: Argument
        Apply the argument to the given prepared statement.
        Specified by:
        apply in interface Argument
        Parameters:
        position - the position to which the argument should be bound, using the stupid JDBC "start at 1" bit
        statement - the prepared statement the argument is to be bound to
        ctx - the statement context
        Throws:
        java.sql.SQLException - if anything goes wrong
      • getSqlType

        public java.lang.Integer getSqlType()
        Returns the Types value that is used.
        Returns:
        the SQL type of the null.
        See Also:
        Types
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object