- Timestamp:
- Apr 27, 2004, 8:39:34 PM (22 years ago)
- Location:
- branches/GNU/src/gcc
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
libjava/java/sql/DataTruncation.java (modified) (3 diffs, 1 prop)
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/gcc
- Property svn:ignore
-
old new 26 26 configure.vr 27 27 configure.vrs 28 28 29 Makefile 29 dir.info30 30 lost+found 31 31 update.out
-
- Property svn:ignore
-
branches/GNU/src/gcc/libjava/java/sql/DataTruncation.java
-
Property cvs2svn:cvs-rev
changed from
1.1to1.1.1.2
r1390 r1391 1 1 /* DataTruncation.java -- Warning when data has been truncated. 2 Copyright (C) 1999, 2000 Free Software Foundation, Inc.2 Copyright (C) 1999, 2000 Free Software Foundation, Inc. 3 3 4 4 This file is part of GNU Classpath. … … 36 36 exception statement from your version. */ 37 37 38 39 38 package java.sql; 40 39 … … 45 44 * @author Aaron M. Renn ([email protected]) 46 45 */ 47 public class DataTruncation extends SQLWarning 46 public class DataTruncation extends SQLWarning 48 47 { 48 49 49 50 /*************************************************************************/ 50 /** 51 * The original size of the data. 52 */ 53 private int dataSize; 51 54 52 /* 53 * Instance Variables 54 */ 55 /** 56 * The index of the parameter or column whose value was truncated. 57 */ 58 private int index; 55 59 56 /** 57 * The original size of the data. 58 * @serialized 59 */ 60 private int dataSize; 60 /** 61 * Indicates whether or not a parameter value was truncated. 62 */ 63 private boolean parameter; 61 64 62 /** 63 * The index of the parameter or column whose value was truncated. 64 * @serialized 65 */ 66 private int index; 65 /** 66 * Indicates whether or not a data column value was truncated. 67 */ 68 private boolean read; 67 69 68 /** 69 * Indicates whether or not a parameter value was truncated. 70 * @serialized 71 */ 72 private boolean parameter; 70 /** 71 * This is the size of the data after truncation. 72 */ 73 private int transferSize; 73 74 74 /** 75 * Indicates whether or not a data column value was truncated. 76 * @serialized 77 */ 78 private boolean read; 75 /** 76 * This method initializes a new instance of <code>DataTruncation</code> 77 * with the specified values. The descriptive error message for this 78 * exception will be "Data truncation", the SQL state will be "01004" 79 * and the vendor specific error code will be set to 0. 80 * 81 * @param index The index of the parameter or column that was truncated. 82 * @param parameter <code>true</code> if a parameter was truncated, 83 * <code>false</code> otherwise. 84 * @param read <code>true</code> if a data column was truncated, 85 * <code>false</code> otherwise. 86 * @param dataSize The original size of the data. 87 * @param transferSize The size of the data after truncation. 88 */ 89 public DataTruncation(int index, boolean parameter, boolean read, int 90 dataSize, int transferSize) 91 { 92 super("Data truncation", "01004"); 79 93 80 /** 81 * This is the size of the data after truncation. 82 * @serialized 83 */ 84 private int transferSize; 94 this.index = index; 95 this.parameter = parameter; 96 this.read = read; 97 this.dataSize = dataSize; 98 this.transferSize = transferSize; 99 } 85 100 86 /*************************************************************************/ 101 /** 102 * This method returns the index of the column or parameter that was 103 * truncated. 104 * 105 * @return The index of the column or parameter that was truncated. 106 */ 107 public int getIndex() 108 { 109 return index; 110 } 87 111 88 /** 89 * Static Variables 90 */ 112 /** 113 * This method determines whether or not it was a parameter that was 114 * truncated. 115 * 116 * @return <code>true</code> if a parameter was truncated, <code>false</code> 117 * otherwise. 118 */ 119 public boolean getParameter() 120 { 121 return parameter; 122 } 91 123 92 /** 93 * This is the serialization UID for this class 94 */ 95 private static final long serialVersionUID = 6464298989504059473L; 124 /** 125 * This method determines whether or not it was a column that was 126 * truncated. 127 * 128 * @return <code>true</code> if a column was truncated, <code>false</code> 129 * otherwise. 130 */ 131 public boolean getRead() 132 { 133 return read; 134 } 96 135 97 /*************************************************************************/ 136 /** 137 * This method returns the original size of the parameter or column that 138 * was truncated. 139 * 140 * @return The original size of the parameter or column that was truncated. 141 */ 142 public int getDataSize() 143 { 144 return dataSize; 145 } 98 146 99 /* 100 * Constructors 101 */ 102 103 /** 104 * This method initializes a new instance of <code>DataTruncation</code> 105 * with the specified values. The descriptive error message for this 106 * exception will be "Data truncation", the SQL state will be "01004" 107 * and the vendor specific error code will be set to 0. 108 * 109 * @param index The index of the parameter or column that was truncated. 110 * @param parameter <code>true</code> if a parameter was truncated, 111 * <code>false</code> otherwise. 112 * @param read <code>true</code> if a data column was truncated, 113 * <code>false</code> otherwise. 114 * @param dataSize The original size of the data. 115 * @param transferSize The size of the data after truncation. 116 */ 117 public 118 DataTruncation(int index, boolean parameter, boolean read, int dataSize, 119 int transferSize) 120 { 121 super("Data truncation", "01004"); 122 123 this.index = index; 124 this.parameter = parameter; 125 this.read = read; 126 this.dataSize = dataSize; 127 this.transferSize = transferSize; 147 /** 148 * This method returns the size of the parameter or column after it was 149 * truncated. 150 * 151 * @return The size of the parameter or column after it was truncated. 152 */ 153 public int getTransferSize() 154 { 155 return transferSize; 156 } 128 157 } 129 130 /*************************************************************************/131 132 /*133 * Instance Methods134 */135 136 /**137 * This method returns the index of the column or parameter that was138 * truncated.139 *140 * @return The index of the column or parameter that was truncated.141 */142 public int143 getIndex()144 {145 return(index);146 }147 148 /*************************************************************************/149 150 /**151 * This method determines whether or not it was a parameter that was152 * truncated.153 *154 * @return <code>true</code> if a parameter was truncated, <code>false</code>155 * otherwise.156 */157 public boolean158 getParameter()159 {160 return(parameter);161 }162 163 /*************************************************************************/164 165 /**166 * This method determines whether or not it was a column that was167 * truncated.168 *169 * @return <code>true</code> if a column was truncated, <code>false</code>170 * otherwise.171 */172 public boolean173 getRead()174 {175 return(read);176 }177 178 /*************************************************************************/179 180 /**181 * This method returns the original size of the parameter or column that182 * was truncated.183 *184 * @return The original size of the parameter or column that was truncated.185 */186 public int187 getDataSize()188 {189 return(dataSize);190 }191 192 /*************************************************************************/193 194 /**195 * This method returns the size of the parameter or column after it was196 * truncated.197 *198 * @return The size of the parameter or column after it was truncated.199 */200 public int201 getTransferSize()202 {203 return(transferSize);204 }205 206 } // class DataTruncation207 -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.
