H2CharType (cayenne-doc: Cayenne Documentation 5.0-M2 API)
Description: declaration: package: org.apache.cayenne.dba.h2, class: H2CharType

# Class H2CharType

java.lang.Object
org.apache.cayenne.access.types.CharType
org.apache.cayenne.dba.h2.H2CharType

All Implemented Interfaces:
  `ExtendedType<String>`

public class H2CharType extends CharType
H2 specific char type handling - used to handle the correct setting of clobs

Since:
  4.1.2

- ## Field Summary

  ### Fields inherited from class CharType

  `trimmingChars, usingClobs`
  Modifier and Type
  Field
  Description
  `protected boolean`
  `trimmingChars`
  `protected boolean`
  `usingClobs`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `H2CharType()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `setJdbcObject(PreparedStatement st, String val, int pos, int type, int precision)`
  Initializes a single parameter of a PreparedStatement with object value.

  ### Methods inherited from class CharType

  `getClassName, isTrimmingChars, isUsingClobs, materializeObject, materializeObject, readCharStream, readClob, readValueStream, rtrim, setTrimmingChars, setUsingClobs, toString`
  Modifier and Type
  Method
  Description
  `String`
  `getClassName()`
  Returns "java.lang.String".
  `boolean`
  `isTrimmingChars()`
  Returns `true` if 'materializeObject' method should trim trailing spaces from the CHAR columns.
  `boolean`
  `isUsingClobs()`
  `String`
  `materializeObject(CallableStatement cs, int index, int type)`
  Reads an object from a stored procedure OUT parameter, converting it to class returned by 'getClassName' method.
  `String`
  `materializeObject(ResultSet rs, int index, int type)`
  Return trimmed string.
  `protected String`
  `readCharStream(ResultSet rs, int index)`
  `protected String`
  `readClob(Clob clob)`
  `protected String`
  `readValueStream(Reader in, int streamSize, int bufSize)`
  `protected String`
  `rtrim(String value)`
  Trim right spaces.
  `void`
  `setTrimmingChars(boolean trimingChars)`
  `void`
  `setUsingClobs(boolean usingClobs)`
  `String`
  `toString(String value)`
  Converts value of the supported type to a human-readable String representation.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### H2CharType

    public H2CharType()

- ## Method Details

  - ### setJdbcObject

    public void setJdbcObject(PreparedStatement st, String val, int pos, int type, int precision) throws Exception
    Description copied from interface: `ExtendedType`
    Initializes a single parameter of a PreparedStatement with object value.
    Specified by:
      `setJdbcObject` in interface `ExtendedType<String>`
    Overrides:
      `setJdbcObject` in class `CharType`
    Throws:
      `Exception`