Class CharColumnMapping

    • Constructor Detail

      • CharColumnMapping

        public CharColumnMapping​(JavaTypeMapping mapping,
                                 RDBMSStoreManager storeMgr,
                                 Column col)
        Constructor.
        Parameters:
        mapping - Java type mapping
        storeMgr - Store Manager
        col - column to be mapped
    • Method Detail

      • initialize

        protected void initialize()
        Method to initialise the column mapping. Provides default length specifications for the CHAR column to fit the data being stored.
      • setChar

        public void setChar​(PreparedStatement ps,
                            int param,
                            char value)
        Method to set a character at the specified position in the JDBC PreparedStatement.
        Specified by:
        setChar in interface ColumnMapping
        Overrides:
        setChar in class AbstractColumnMapping
        Parameters:
        ps - The PreparedStatement
        param - Parameter position
        value - The value to set
      • getChar

        public char getChar​(ResultSet rs,
                            int param)
        Method to extract a character from the ResultSet at the specified position
        Specified by:
        getChar in interface ColumnMapping
        Overrides:
        getChar in class AbstractColumnMapping
        Parameters:
        rs - The Result Set
        param - The parameter position
        Returns:
        the character
      • setBoolean

        public void setBoolean​(PreparedStatement ps,
                               int param,
                               boolean value)
        Method to set a boolean at the specified position in the JDBC PreparedStatement.
        Specified by:
        setBoolean in interface ColumnMapping
        Overrides:
        setBoolean in class AbstractColumnMapping
        Parameters:
        ps - The PreparedStatement
        param - Parameter position
        value - The value to set
      • getBoolean

        public boolean getBoolean​(ResultSet rs,
                                  int param)
        Method to extract a boolean from the ResultSet at the specified position
        Specified by:
        getBoolean in interface ColumnMapping
        Overrides:
        getBoolean in class AbstractColumnMapping
        Parameters:
        rs - The Result Set
        param - The parameter position
        Returns:
        the boolean
      • getJavaUtilDateFormat

        public SimpleDateFormat getJavaUtilDateFormat()
        Get a Format object to handle java.util.Date. If a TimeZone is present, it will be used to format dates to that zone.
        Returns:
        Date formatter to use