1
1
/*
2
- * Copyright (c) 1996, 2013 , Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 1996, 2020 , Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
26
26
package java .sql ;
27
27
28
28
/**
29
- * An exception thrown as a < code> DataTruncation</code> exception
29
+ * An exception thrown as a {@ code DataTruncation} exception
30
30
* (on writes) or reported as a
31
- * < code> DataTruncation</code> warning (on reads)
31
+ * {@ code DataTruncation} warning (on reads)
32
32
* when a data values is unexpectedly truncated for reasons other than its having
33
- * exceeded < code> MaxFieldSize</code> .
33
+ * exceeded {@ code MaxFieldSize} .
34
34
*
35
- * <P>The SQLstate for a < code> DataTruncation</code> during read is < code> 01004</code> .
36
- * <P>The SQLstate for a < code> DataTruncation</code> during write is < code> 22001</code> .
35
+ * <P>The SQLstate for a {@ code DataTruncation} during read is {@ code 01004} .
36
+ * <P>The SQLstate for a {@ code DataTruncation} during write is {@ code 22001} .
37
37
*
38
38
* @since 1.1
39
39
*/
40
40
41
41
public class DataTruncation extends SQLWarning {
42
42
43
43
/**
44
- * Creates a < code> DataTruncation</code> object
44
+ * Creates a {@ code DataTruncation} object
45
45
* with the SQLState initialized
46
- * to 01004 when < code> read</code> is set to < code> true</code> and 22001
47
- * when < code> read</code> is set to < code> false</code> ,
46
+ * to 01004 when {@ code read} is set to {@ code true} and 22001
47
+ * when {@ code read} is set to {@ code false} ,
48
48
* the reason set to "Data truncation", the
49
49
* vendor code set to 0, and
50
50
* the other fields set to the given values.
51
- * The < code> cause</code> is not initialized, and may subsequently be
51
+ * The {@ code cause} is not initialized, and may subsequently be
52
52
* initialized by a call to the
53
53
* {@link Throwable#initCause(java.lang.Throwable)} method.
54
54
*
@@ -71,10 +71,10 @@ public DataTruncation(int index, boolean parameter,
71
71
}
72
72
73
73
/**
74
- * Creates a < code> DataTruncation</code> object
74
+ * Creates a {@ code DataTruncation} object
75
75
* with the SQLState initialized
76
- * to 01004 when < code> read</code> is set to < code> true</code> and 22001
77
- * when < code> read</code> is set to < code> false</code> ,
76
+ * to 01004 when {@ code read} is set to {@ code true} and 22001
77
+ * when {@ code read} is set to {@ code false} ,
78
78
* the reason set to "Data truncation", the
79
79
* vendor code set to 0, and
80
80
* the other fields set to the given values.
@@ -84,8 +84,8 @@ public DataTruncation(int index, boolean parameter,
84
84
* @param read true if a read was truncated
85
85
* @param dataSize the original size of the data
86
86
* @param transferSize the size after truncation
87
- * @param cause the underlying reason for this < code> DataTruncation</code>
88
- * (which is saved for later retrieval by the < code> getCause()</code> method);
87
+ * @param cause the underlying reason for this {@ code DataTruncation}
88
+ * (which is saved for later retrieval by the {@ code getCause()} method);
89
89
* may be null indicating the cause is non-existent or unknown.
90
90
*
91
91
* @since 1.6
@@ -105,7 +105,7 @@ public DataTruncation(int index, boolean parameter,
105
105
* Retrieves the index of the column or parameter that was truncated.
106
106
*
107
107
* <P>This may be -1 if the column or parameter index is unknown, in
108
- * which case the < code> parameter</code> and < code> read</code> fields should be ignored.
108
+ * which case the {@ code parameter} and {@ code read} fields should be ignored.
109
109
*
110
110
* @return the index of the truncated parameter or column value
111
111
*/
@@ -117,8 +117,8 @@ public int getIndex() {
117
117
* Indicates whether the value truncated was a parameter value or
118
118
* a column value.
119
119
*
120
- * @return < code> true</code> if the value truncated was a parameter;
121
- * < code> false</code> if it was a column value
120
+ * @return {@ code true} if the value truncated was a parameter;
121
+ * {@ code false} if it was a column value
122
122
*/
123
123
public boolean getParameter () {
124
124
return parameter ;
@@ -127,8 +127,8 @@ public boolean getParameter() {
127
127
/**
128
128
* Indicates whether or not the value was truncated on a read.
129
129
*
130
- * @return < code> true</code> if the value was truncated when read from
131
- * the database; < code> false</code> if the data was truncated on a write
130
+ * @return {@ code true} if the value was truncated when read from
131
+ * the database; {@ code false} if the data was truncated on a write
132
132
*/
133
133
public boolean getRead () {
134
134
return read ;
@@ -137,7 +137,7 @@ public boolean getRead() {
137
137
/**
138
138
* Gets the number of bytes of data that should have been transferred.
139
139
* This number may be approximate if data conversions were being
140
- * performed. The value may be < code>-1</code> if the size is unknown.
140
+ * performed. The value may be {@ code -1} if the size is unknown.
141
141
*
142
142
* @return the number of bytes of data that should have been transferred
143
143
*/
@@ -147,7 +147,7 @@ public int getDataSize() {
147
147
148
148
/**
149
149
* Gets the number of bytes of data actually transferred.
150
- * The value may be < code>-1</code> if the size is unknown.
150
+ * The value may be {@ code -1} if the size is unknown.
151
151
*
152
152
* @return the number of bytes of data actually transferred
153
153
*/
0 commit comments