Class BooleanColumnMapping

    • Constructor Detail

      • BooleanColumnMapping

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

      • initialize

        private void initialize()
      • setBoolean

        public void setBoolean​(java.sql.PreparedStatement ps,
                               int param,
                               boolean value)
        Description copied from interface: ColumnMapping
        Sets a value into ps at position specified by paramIndex.
        Specified by:
        setBoolean in interface ColumnMapping
        Overrides:
        setBoolean in class AbstractColumnMapping
        Parameters:
        ps - PreparedStatement
        param - the position of the value in the statement
        value - the value
      • getBoolean

        public boolean getBoolean​(java.sql.ResultSet rs,
                                  int param)
        Description copied from interface: ColumnMapping
        Obtains a value from resultSet at position specified by exprIndex.
        Specified by:
        getBoolean in interface ColumnMapping
        Overrides:
        getBoolean in class AbstractColumnMapping
        Parameters:
        rs - ResultSet
        param - the position of the value in the result
        Returns:
        the value
      • setString

        public void setString​(java.sql.PreparedStatement ps,
                              int param,
                              java.lang.String value)
        Setter for booleans stored as String datastore types.
        Specified by:
        setString in interface ColumnMapping
        Overrides:
        setString in class AbstractColumnMapping
        Parameters:
        ps - PreparedStatement
        param - Number of the field
        value - Value of the boolean
      • getString

        public java.lang.String getString​(java.sql.ResultSet rs,
                                          int param)
        Accessor for the value for a boolean field stored as a String datastore type.
        Specified by:
        getString in interface ColumnMapping
        Overrides:
        getString in class AbstractColumnMapping
        Parameters:
        rs - ResultSet
        param - number of the parameter.
        Returns:
        The value
      • setObject

        public void setObject​(java.sql.PreparedStatement ps,
                              int param,
                              java.lang.Object value)
        Description copied from interface: ColumnMapping
        Sets a value into ps at position specified by paramIndex.
        Specified by:
        setObject in interface ColumnMapping
        Overrides:
        setObject in class AbstractColumnMapping
        Parameters:
        ps - PreparedStatement
        param - the position of the value in the statement
        value - the value
      • getObject

        public java.lang.Object getObject​(java.sql.ResultSet rs,
                                          int param)
        Description copied from interface: ColumnMapping
        Obtains a value from resultSet at position specified by exprIndex.
        Specified by:
        getObject in interface ColumnMapping
        Overrides:
        getObject in class AbstractColumnMapping
        Parameters:
        rs - ResultSet
        param - the position of the value in the result
        Returns:
        the value