Class BitStringEnumSetArgument<E extends java.lang.Enum<E>>

  • All Implemented Interfaces:
    Argument

    public class BitStringEnumSetArgument<E extends java.lang.Enum<E>>
    extends java.lang.Object
    implements Argument
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.EnumSet<E> elements  
      private E[] enumConstants  
    • Constructor Summary

      Constructors 
      Constructor Description
      BitStringEnumSetArgument​(java.lang.Class<E> enumType, java.util.EnumSet<E> elements)  
    • 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.
      • Methods inherited from class java.lang.Object

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

      • enumConstants

        private final E extends java.lang.Enum<E>[] enumConstants
      • elements

        private final java.util.EnumSet<E extends java.lang.Enum<E>> elements
    • Constructor Detail

      • BitStringEnumSetArgument

        BitStringEnumSetArgument​(java.lang.Class<E> enumType,
                                 java.util.EnumSet<E> elements)
    • 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