Source Code Cross Referenced for SQLSyntaxErrorException.java in  » 6.0-JDK-Core » sql » java » sql » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » sql » java.sql 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001        /*
002         * Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
003         * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004         *
005         * This code is free software; you can redistribute it and/or modify it
006         * under the terms of the GNU General Public License version 2 only, as
007         * published by the Free Software Foundation.  Sun designates this
008         * particular file as subject to the "Classpath" exception as provided
009         * by Sun in the LICENSE file that accompanied this code.
010         *
011         * This code is distributed in the hope that it will be useful, but WITHOUT
012         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013         * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
014         * version 2 for more details (a copy is included in the LICENSE file that
015         * accompanied this code).
016         *
017         * You should have received a copy of the GNU General Public License version
018         * 2 along with this work; if not, write to the Free Software Foundation,
019         * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020         *
021         * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
022         * CA 95054 USA or visit www.sun.com if you need additional information or
023         * have any questions.
024         */
025
026        package java.sql;
027
028        /**
029         * The subclass of {@link SQLException} thrown when the SQLState class value is '<i>42</i>'. This indicates that the
030         * in-progress query has violated SQL syntax rules.
031         *  
032         * @since 1.6
033         */
034        public class SQLSyntaxErrorException extends SQLNonTransientException {
035
036            /**
037             * Constructs a <code>SQLSyntaxErrorException</code> object.
038             *  The <code>reason</code>, <code>SQLState</code> are initialized
039             * to <code>null</code> and the vendor code is initialized to 0.
040             *
041             * The <code>cause</code> is not initialized, and may subsequently be
042             * initialized by a call to the 
043             * {@link Throwable#initCause(java.lang.Throwable)} method.
044             * <p>
045             * @since 1.6
046             */
047            public SQLSyntaxErrorException() {
048                super ();
049            }
050
051            /**
052             * Constructs a <code>SQLSyntaxErrorException</code> object 
053             * with a given <code>reason</code>. The <code>SQLState</code> 
054             * is initialized to <code>null</code> and the vender code is initialized 
055             * to 0.
056             *
057             * The <code>cause</code> is not initialized, and may subsequently be
058             * initialized by a call to the 
059             * {@link Throwable#initCause(java.lang.Throwable)} method.
060             * <p>
061             * @param reason a description of the exception
062             * @since 1.6
063             */
064            public SQLSyntaxErrorException(String reason) {
065                super (reason);
066            }
067
068            /**
069             * Constructs a <code>SQLSyntaxErrorException</code> object
070             * with a given <code>reason</code> and <code>SQLState</code>.
071             *
072             * The <code>cause</code> is not initialized, and may subsequently be
073             * initialized by a call to the 
074             * {@link Throwable#initCause(java.lang.Throwable)} method. The vendor code
075             * is initialized to 0.
076             * <p>
077             * @param reason a description of the exception
078             * @param SQLState an XOPEN or SQL:2003 code identifying the exception
079             * @since 1.6
080             */
081            public SQLSyntaxErrorException(String reason, String SQLState) {
082                super (reason, SQLState);
083            }
084
085            /**
086             * Constructs a <code>SQLSyntaxErrorException</code> object
087             *  with a given <code>reason</code>, <code>SQLState</code>  and 
088             * <code>vendorCode</code>.
089             *
090             * The <code>cause</code> is not initialized, and may subsequently be
091             * initialized by a call to the 
092             * {@link Throwable#initCause(java.lang.Throwable)} method.
093             * <p>
094             * @param reason a description of the exception
095             * @param SQLState an XOPEN or SQL:2003 code identifying the exception
096             * @param vendorCode a database vendor specific exception code
097             * @since 1.6
098             */
099            public SQLSyntaxErrorException(String reason, String SQLState,
100                    int vendorCode) {
101                super (reason, SQLState, vendorCode);
102            }
103
104            /**
105             * Constructs a <code>SQLSyntaxErrorException</code> object 
106             *   with a given  <code>cause</code>.
107             * The <code>SQLState</code> is initialized
108             * to <code>null</code> and the vendor code is initialized to 0. 
109             * The <code>reason</code>  is initialized to <code>null</code> if 
110             * <code>cause==null</code> or to <code>cause.toString()</code> if 
111             * <code>cause!=null</code>.
112             * <p>
113             * @param cause the underlying reason for this <code>SQLException</code> (which is saved for later retrieval bythe <code>getCause()</code> method); may be null indicating
114             *     the cause is non-existent or unknown.
115             * @since 1.6
116             */
117            public SQLSyntaxErrorException(Throwable cause) {
118                super (cause);
119            }
120
121            /**
122             * Constructs a <code>SQLSyntaxErrorException</code> object 
123             * with a given
124             * <code>reason</code> and  <code>cause</code>.  
125             * The <code>SQLState</code> is  initialized to <code>null</code>
126             * and the vendor code is initialized to 0.
127             * <p>
128             * @param reason a description of the exception. 
129             * @param cause the underlying reason for this <code>SQLException</code> (which is saved for later retrieval by the <code>getCause()</code> method); may be null indicating
130             *     the cause is non-existent or unknown.
131             * @since 1.6
132             */
133            public SQLSyntaxErrorException(String reason, Throwable cause) {
134                super (reason, cause);
135            }
136
137            /**
138             * Constructs a <code>SQLSyntaxErrorException</code> object 
139             * with a given
140             * <code>reason</code>, <code>SQLState</code> and  <code>cause</code>.  
141             * The vendor code is initialized to 0.
142             * <p>
143             * @param reason a description of the exception. 
144             * @param SQLState an XOPEN or SQL:2003 code identifying the exception 
145             * @param cause the (which is saved for later retrieval by the <code>getCause()</code> method); may be null indicating
146             *     the cause is non-existent or unknown.
147             * @since 1.6
148             */
149            public SQLSyntaxErrorException(String reason, String SQLState,
150                    Throwable cause) {
151                super (reason, SQLState, cause);
152            }
153
154            /**
155             *  Constructs a <code>SQLSyntaxErrorException</code> object
156             * with a given
157             * <code>reason</code>, <code>SQLState</code>, <code>vendorCode</code>
158             * and  <code>cause</code>.  
159             * <p>
160             * @param reason a description of the exception 
161             * @param SQLState an XOPEN or SQL:2003 code identifying the exception
162             * @param vendorCode a database vendor-specific exception code
163             * @param cause the underlying reason for this <code>SQLException</code> (which is saved for later retrieval by the <code>getCause()</code> method); may be null indicating
164             *     the cause is non-existent or unknown.
165             * @since 1.6
166             */
167            public SQLSyntaxErrorException(String reason, String SQLState,
168                    int vendorCode, Throwable cause) {
169                super (reason, SQLState, vendorCode, cause);
170            }
171
172            private static final long serialVersionUID = -1843832610477496053L;
173        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.