public DataTruncation(int index,
boolean parameter,
boolean read,
int dataSize,
int transferSize) {
super("Data truncation", read == true?"01004":"22001");
this.index = index;
this.parameter = parameter;
this.read = read;
this.dataSize = dataSize;
this.transferSize = transferSize;
}
Creates a DataTruncation object
with the SQLState initialized
to 01004 when read is set to true and 22001
when read is set to false,
the reason set to "Data truncation", the
vendor code set to 0, and
the other fields set to the given values.
The cause is not initialized, and may subsequently be
initialized by a call to the
Throwable#initCause(java.lang.Throwable) method.
Parameters:
index - The index of the parameter or column value
parameter - true if a parameter value was truncated
read - true if a read was truncated
dataSize - the original size of the data
transferSize - the size after truncation
|
public DataTruncation(int index,
boolean parameter,
boolean read,
int dataSize,
int transferSize,
Throwable cause) {
super("Data truncation", read == true?"01004":"22001",cause);
this.index = index;
this.parameter = parameter;
this.read = read;
this.dataSize = dataSize;
this.transferSize = transferSize;
}
Creates a DataTruncation object
with the SQLState initialized
to 01004 when read is set to true and 22001
when read is set to false,
the reason set to "Data truncation", the
vendor code set to 0, and
the other fields set to the given values.
Parameters:
index - The index of the parameter or column value
parameter - true if a parameter value was truncated
read - true if a read was truncated
dataSize - the original size of the data
transferSize - the size after truncation
cause - the underlying reason for this DataTruncation
(which is saved for later retrieval by the getCause() method);
may be null indicating the cause is non-existent or unknown.
- since:
1.6 -
|