src/java.sql.rowset/share/classes/javax/sql/rowset/RowSetWarning.java

Print this page




 111      * @param reason a <code>String</code> giving a description of the
 112      *        warning;
 113      * @param SQLState an XOPEN code identifying the warning; if a non standard
 114      *        XOPEN <i>SQLState</i> is supplied, no exception is thrown.
 115      * @param vendorCode a database vendor-specific warning code
 116      */
 117     public RowSetWarning(java.lang.String reason, java.lang.String SQLState, int vendorCode) {
 118         super(reason, SQLState, vendorCode);
 119     }
 120 
 121     /**
 122      * Retrieves the warning chained to this <code>RowSetWarning</code>
 123      * object.
 124      *
 125      * @return the <code>RowSetWarning</code> object chained to this one; if no
 126      *         <code>RowSetWarning</code> object is chained to this one,
 127      *         <code>null</code> is returned (default value)
 128      * @see #setNextWarning
 129      */
 130     public RowSetWarning getNextWarning() {
 131         return rwarning;








 132     }
 133 
 134     /**
 135      * Sets <i>warning</i> as the next warning, that is, the warning chained
 136      * to this <code>RowSetWarning</code> object.
 137      *
 138      * @param warning the <code>RowSetWarning</code> object to be set as the
 139      *     next warning; if the <code>RowSetWarning</code> is null, this
 140      *     represents the finish point in the warning chain
 141      * @see #getNextWarning
 142      */
 143     public void setNextWarning(RowSetWarning warning) {
 144         rwarning = warning;
 145     }
 146 
 147     static final long serialVersionUID = 6678332766434564774L;
 148 }


 111      * @param reason a <code>String</code> giving a description of the
 112      *        warning;
 113      * @param SQLState an XOPEN code identifying the warning; if a non standard
 114      *        XOPEN <i>SQLState</i> is supplied, no exception is thrown.
 115      * @param vendorCode a database vendor-specific warning code
 116      */
 117     public RowSetWarning(java.lang.String reason, java.lang.String SQLState, int vendorCode) {
 118         super(reason, SQLState, vendorCode);
 119     }
 120 
 121     /**
 122      * Retrieves the warning chained to this <code>RowSetWarning</code>
 123      * object.
 124      *
 125      * @return the <code>RowSetWarning</code> object chained to this one; if no
 126      *         <code>RowSetWarning</code> object is chained to this one,
 127      *         <code>null</code> is returned (default value)
 128      * @see #setNextWarning
 129      */
 130     public RowSetWarning getNextWarning() {        
 131         try {
 132             return ((RowSetWarning)getNextException());
 133         } catch (ClassCastException ex) {
 134             // The chained value isn't a RowSetWarning.
 135             // This is a programming error by whoever added it to
 136             // the RowSetWarning chain.  We throw a Java "Error".
 137             throw new Error("RowSetWarning chain holds value that is not a RowSetWarning");
 138         }
 139         
 140     }
 141 
 142     /**
 143      * Sets <i>warning</i> as the next warning, that is, the warning chained
 144      * to this <code>RowSetWarning</code> object.
 145      *
 146      * @param warning the <code>RowSetWarning</code> object to be set as the
 147      *     next warning; if the <code>RowSetWarning</code> is null, this
 148      *     represents the finish point in the warning chain
 149      * @see #getNextWarning
 150      */
 151     public void setNextWarning(RowSetWarning warning) {
 152         setNextException(warning);
 153     }
 154 
 155     static final long serialVersionUID = 6678332766434564774L;
 156 }