Class NCharColumnMapping

All Implemented Interfaces:
ColumnMapping
Direct Known Subclasses:
NVarcharColumnMapping

public class NCharColumnMapping extends CharColumnMapping
Mapping of a NCHAR column. Copied from CharColumnMapping but uses setNString/getNString instead of setString/getString.
  • Constructor Details

  • Method Details

    • getJDBCType

      public int getJDBCType()
      Description copied from class: AbstractColumnMapping
      Method to return the java.sql.Types type that this relates to.
      Overrides:
      getJDBCType in class CharColumnMapping
      Returns:
      The JDBC "type"
    • 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 CharColumnMapping
      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 CharColumnMapping
      Parameters:
      rs - The Result Set
      param - The parameter position
      Returns:
      the character
    • setString

      public void setString(PreparedStatement ps, int param, String value)
      Method to set a String at the specified position in the JDBC PreparedStatement.
      Specified by:
      setString in interface ColumnMapping
      Overrides:
      setString in class CharColumnMapping
      Parameters:
      ps - The PreparedStatement
      param - Parameter position
      value - The value to set
    • getString

      public String getString(ResultSet rs, int param)
      Method to extract a String from the ResultSet at the specified position
      Specified by:
      getString in interface ColumnMapping
      Overrides:
      getString in class CharColumnMapping
      Parameters:
      rs - The Result Set
      param - The parameter position
      Returns:
      the String
    • 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 CharColumnMapping
      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 CharColumnMapping
      Parameters:
      rs - The Result Set
      param - The parameter position
      Returns:
      the boolean
    • setObject

      public void setObject(PreparedStatement ps, int param, Object value)
      Method to set an object at the specified position in the JDBC PreparedStatement.
      Specified by:
      setObject in interface ColumnMapping
      Overrides:
      setObject in class CharColumnMapping
      Parameters:
      ps - The PreparedStatement
      param - Parameter position
      value - The value to set
    • getObject

      public Object getObject(ResultSet rs, int param)
      Method to extract an object from the ResultSet at the specified position
      Specified by:
      getObject in interface ColumnMapping
      Overrides:
      getObject in class CharColumnMapping
      Parameters:
      rs - The Result Set
      param - The parameter position
      Returns:
      the object