Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## superwaba.ext.xplat.sql
Class DataTruncation

    java.lang.Object
      |
      +--java.lang.Throwable
            |
            +--java.lang.Exception
                  |
                  +--superwaba.ext.xplat.sql.SQLException
                        |
                        +--superwaba.ext.xplat.sql.SQLWarning
                              |
                              +--superwaba.ext.xplat.sql.DataTruncation

public class DataTruncation
extends SQLWarning

This exception is thrown when a piece of data is unexpectedly truncated in JDBC.

Constructor Summary
`DataTruncation(int index, boolean parameter, boolean read, int dataSize, int transferSize)` This method initializes a new instance of `DataTruncation` with the specified values.

Method Summary
`int` | `getDataSize()` This method returns the original size of the parameter or column that was truncated.
`int` | `getIndex()` This method returns the index of the column or parameter that was truncated.
`boolean` | `getParameter()` This method determines whether or not it was a parameter that was truncated.
`boolean` | `getRead()` This method determines whether or not it was a column that was truncated.
`int` | `getTransferSize()` This method returns the size of the parameter or column after it was truncated.

Methods inherited from class superwaba.ext.xplat.sql.SQLWarning
`getNextWarning, setNextWarning`

Methods inherited from class superwaba.ext.xplat.sql.SQLException
`getErrorCode, getNextException, getSQLState, setNextException`

Methods inherited from class java.lang.Throwable
`getMessage, printStackTrace, toString`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, wait, wait`

Constructor Detail

### DataTruncation

    public DataTruncation(int index,
                          boolean parameter,
                          boolean read,
                          int dataSize,
                          int transferSize)

  This method initializes a new instance of `DataTruncation` with the specified values. The descriptive error message for this exception will be "Data truncation", the SQL state will be "01004" and the vendor specific error code will be set to 0.
  Parameters:
    `index` - The index of the parameter or column that was truncated.
    `parameter` - `true` if a parameter was truncated, `false` otherwise.
    `read` - `true` if a data column was truncated, `false` otherwise.
    `dataSize` - The original size of the data.
    `transferSize` - The size of the data after truncation.

Method Detail

### getIndex

    public int getIndex()

  This method returns the index of the column or parameter that was truncated.
  Returns:
    The index of the column or parameter that was truncated.

### getParameter

    public boolean getParameter()

  This method determines whether or not it was a parameter that was truncated.
  Returns:
    `true` if a parameter was truncated, `false` otherwise.

### getRead

    public boolean getRead()

  This method determines whether or not it was a column that was truncated.
  Returns:
    `true` if a column was truncated, `false` otherwise.

### getDataSize

    public int getDataSize()

  This method returns the original size of the parameter or column that was truncated.
  Returns:
    The original size of the parameter or column that was truncated.

### getTransferSize

    public int getTransferSize()

  This method returns the size of the parameter or column after it was truncated.
  Returns:
    The size of the parameter or column after it was truncated.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD