Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

oracle.adfnmc.java.sql
Class SQLException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by oracle.adfnmc.AdfNmcException
                  extended by oracle.adfnmc.java.sql.SQLException
Direct Known Subclasses:
BatchUpdateException, SQLWarning

public class SQLException
extends AdfNmcException

An Exception class that is used in conjunction with JDBC operations. It provides information about problems encountered with Database access and other problems related to JDBC

The SQLException class provides the following information:


Field Summary
static int SQL_ERRORCODE_FILENOTFOUND
           
 
Fields inherited from class oracle.adfnmc.AdfNmcException
CLASS_INSTANCE, PRIORITY_HIGH, PRIORITY_LOW, PRIORITY_MEDIUM
 
Constructor Summary
SQLException(java.lang.Class callingClass, java.lang.String callingMethod)
          Creates an SQLException object.
SQLException(java.lang.Class callingClass, java.lang.String callingMethod, java.lang.String theReason)
          Creates an SQLException object.
SQLException(java.lang.Class callingClass, java.lang.String callingMethod, java.lang.String theReason, java.lang.String theSQLState)
          Creates an SQLException object.
SQLException(java.lang.Class callingClass, java.lang.String callingMethod, java.lang.String theReason, java.lang.String theSQLState, int theErrorCode)
          Creates an SQLException object.
SQLException(java.lang.Class callingClass, java.lang.String callingMethod, java.lang.Throwable cause, java.lang.String msg, java.lang.Object[] params)
           
SQLException(java.lang.Class callingClass, java.lang.String callingMethod, java.lang.Throwable cause, java.lang.String bundleName, java.lang.String messageCode, java.lang.Object[] params, int errorCode)
           
 
Method Summary
 int getErrorCode()
          Returns the integer error code for this SQLException
 SQLException getNextException()
          Retrieves the SQLException chained to this SQLException, if any.
 java.lang.String getSQLState()
          Retrieves the SQLState description string for this SQLException object
 void setNextException(SQLException ex)
          Adds the SQLException to the end of this SQLException chain.
 
Methods inherited from class oracle.adfnmc.AdfNmcException
addLogMessage, addLogMessage, getCallerInfo, getCause, getPriority, getStringContent, getStringContent, isFatal, printLogMessages, setFatal, setInnerException, setPriority, toLogString, toString
 
Methods inherited from class java.lang.Throwable
getMessage, printStackTrace
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SQL_ERRORCODE_FILENOTFOUND

public static final int SQL_ERRORCODE_FILENOTFOUND
See Also:
Constant Field Values
Constructor Detail

SQLException

public SQLException(java.lang.Class callingClass,
                    java.lang.String callingMethod)
Creates an SQLException object. The Reason string is set to null, the SQLState string is set to null and the Error Code is set to 0.


SQLException

public SQLException(java.lang.Class callingClass,
                    java.lang.String callingMethod,
                    java.lang.String theReason)
Creates an SQLException object. The Reason string is set to the given reason string, the SQLState string is set to null and the Error Code is set to 0.

Parameters:
theReason - the string to use as the Reason string

SQLException

public SQLException(java.lang.Class callingClass,
                    java.lang.String callingMethod,
                    java.lang.String theReason,
                    java.lang.String theSQLState)
Creates an SQLException object. The Reason string is set to the given reason string, the SQLState string is set to the given SQLState string and the Error Code is set to 0.

Parameters:
theReason - the string to use as the Reason string
theSQLState - the string to use as the SQLState string

SQLException

public SQLException(java.lang.Class callingClass,
                    java.lang.String callingMethod,
                    java.lang.String theReason,
                    java.lang.String theSQLState,
                    int theErrorCode)
Creates an SQLException object. The Reason string is set to the given reason string, the SQLState string is set to the given SQLState string and the Error Code is set to the given error code value.

Parameters:
theReason - the string to use as the Reason string
theSQLState - the string to use as the SQLState string
theErrorCode - the integer value for the error code

SQLException

public SQLException(java.lang.Class callingClass,
                    java.lang.String callingMethod,
                    java.lang.Throwable cause,
                    java.lang.String msg,
                    java.lang.Object[] params)

SQLException

public SQLException(java.lang.Class callingClass,
                    java.lang.String callingMethod,
                    java.lang.Throwable cause,
                    java.lang.String bundleName,
                    java.lang.String messageCode,
                    java.lang.Object[] params,
                    int errorCode)
Method Detail

getErrorCode

public int getErrorCode()
Returns the integer error code for this SQLException

Returns:
The integer error code for this SQLException. The meaning of the code is specific to the vendor of the database.

getNextException

public SQLException getNextException()
Retrieves the SQLException chained to this SQLException, if any.

Returns:
The SQLException chained to this SQLException. null if there is no SQLException chained to this SQLException.

getSQLState

public java.lang.String getSQLState()
Retrieves the SQLState description string for this SQLException object

Returns:
The SQLState string for this SQLException object. This is an error description string which follows either the SQL 99 conventions or the XOPEN SQLstate conventions. The potential values of the SQLState string are described in each of the specifications. Which of the conventions is being used by the SQLState string can be discovered by using the getSQLStateType method of the DatabaseMetaData interface.

setNextException

public void setNextException(SQLException ex)
Adds the SQLException to the end of this SQLException chain.

Parameters:
ex - the new SQLException to be added to the end of the chain

Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

Copyright © 2011, Oracle and/or its affiliates. All rights reserved.