Class BooleanRepresentationFactory.StringBooleanRepresentation

  • All Implemented Interfaces:
    BooleanRepresentation<java.lang.String>
    Enclosing class:
    BooleanRepresentationFactory

    public static class BooleanRepresentationFactory.StringBooleanRepresentation
    extends java.lang.Object
    implements BooleanRepresentation<java.lang.String>
    BooleanRepresentation which takes 2 strings for true and false representations as constructor parameter;
    • Constructor Summary

      Constructors 
      Constructor Description
      StringBooleanRepresentation​(java.lang.String trueRepresentation, java.lang.String falseRepresentation)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean getBoolean​(java.sql.ResultSet rs, int columnIndex)
      Read the boolean from the given ResultSet
      java.lang.String getRepresentation​(boolean bool)  
      void setBoolean​(java.sql.PreparedStatement stmnt, int idx, boolean val)
      Set the boolean value into the statement
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • StringBooleanRepresentation

        public StringBooleanRepresentation​(java.lang.String trueRepresentation,
                                           java.lang.String falseRepresentation)
    • Method Detail

      • setBoolean

        public void setBoolean​(java.sql.PreparedStatement stmnt,
                               int idx,
                               boolean val)
                        throws java.sql.SQLException
        Description copied from interface: BooleanRepresentation
        Set the boolean value into the statement
        Specified by:
        setBoolean in interface BooleanRepresentation<java.lang.String>
        Throws:
        java.sql.SQLException
      • getBoolean

        public boolean getBoolean​(java.sql.ResultSet rs,
                                  int columnIndex)
                           throws java.sql.SQLException
        Description copied from interface: BooleanRepresentation
        Read the boolean from the given ResultSet
        Specified by:
        getBoolean in interface BooleanRepresentation<java.lang.String>
        Throws:
        java.sql.SQLException
      • getRepresentation

        public java.lang.String getRepresentation​(boolean bool)
        Specified by:
        getRepresentation in interface BooleanRepresentation<java.lang.String>
        Returns:
        return the representation for true and false
      • toString

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