Class DateTimeOffsetType


public class DateTimeOffsetType extends AbstractDataType
AbstractDataType mapping Microsoft SQL Server's DATETIMEOFFSET type.
Since:
2.7.0
Author:
Richard DiCroce
  • Field Details

    • TYPE

      public static final int TYPE
      JDBC SQL type code for Microsoft SQL Server's DATETIMEOFFSET type.
      See Also:
  • Constructor Details

    • DateTimeOffsetType

      public DateTimeOffsetType()
      Default constructor.
  • Method Details

    • typeCast

      public Object typeCast(Object value) throws TypeCastException
      Description copied from class: DataType
      Returns the specified value typecasted to this DataType
      Specified by:
      typeCast in class DataType
      Parameters:
      value - the value to typecast.
      Returns:
      the typecast value.
      Throws:
      TypeCastException - if the value cannot be typecast to this DataType.
    • getSqlValue

      public Object getSqlValue(int column, ResultSet resultSet) throws SQLException, TypeCastException
      Description copied from class: DataType
      Returns the specified column value from the specified resultset object.
      Overrides:
      getSqlValue in class AbstractDataType
      Parameters:
      column - the column index to read, starting at 1.
      resultSet - the result set to read the column value from.
      Returns:
      the column value.
      Throws:
      SQLException - if a database access error occurs.
      TypeCastException - if the value cannot be typecast to this DataType.
    • setSqlValue

      public void setSqlValue(Object value, int column, PreparedStatement statement) throws SQLException, TypeCastException
      Description copied from class: DataType
      Set the specified value to the specified prepared statement object.
      Overrides:
      setSqlValue in class AbstractDataType
      Parameters:
      value - the value to bind.
      column - the parameter index to bind to, starting at 1.
      statement - the prepared statement to bind the value on.
      Throws:
      SQLException - if a database access error occurs.
      TypeCastException - if the value cannot be typecast to this DataType.
    • isDateTime

      public boolean isDateTime()
      Description copied from class: DataType
      Returns true if this DataType represents a date and/or time.
      Overrides:
      isDateTime in class AbstractDataType
      Returns:
      true if this DataType represents a date and/or time.