public class DatabaseException extends PRException
The subclass ConnectionException
(and its subclasses) represent connection errors, and the other subclasses
represent operational errors.
In most cases, when an exception is thrown, the Processing Status is set to
Error. Following are some subclasses of DatabaseException
that
are commonly used, and the messages typically used for the Processing Status
error.
See the subclasses of this class for more information about specific exception classes.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT |
static java.lang.String |
VERSION |
mLookUpRuleMessages
Constructor and Description |
---|
DatabaseException(int aSeverity,
java.lang.String aDescr)
Creates an exception with a severity and a message.
|
DatabaseException(java.lang.String aDescr)
Creates a database exception with a given message.
|
DatabaseException(java.lang.Throwable aCause,
int aSeverity,
java.lang.String aDescr,
java.lang.String aSQL,
java.lang.String[] aSQLInserts)
Creates a general database exception with a
given severity, and with other information.
|
DatabaseException(java.lang.Throwable aCause,
int aSeverity,
java.lang.String aDescr,
java.lang.String aSQL,
java.lang.String[] aSQLInserts,
java.lang.String aDBName,
java.lang.String aOperation)
Creates a general database exception with a
given severity, and with other information, including db name and operation.
|
DatabaseException(java.lang.Throwable aCause,
java.lang.String aDescr)
Creates a database exception with a given message,
caused by the given exception or error.
|
DatabaseException(java.lang.Throwable aCause,
java.lang.String aMsgID,
java.lang.String[] aMsgInserts,
int aSeverity,
java.lang.String aSQL,
java.lang.String[] aSQLInserts)
Creates a database exception with a
given severity, and with other information.
|
DatabaseException(java.lang.Throwable aCause,
java.lang.Throwable aSecCause,
java.lang.String aMsgID,
java.lang.String[] aMsgInserts,
int aSeverity,
java.lang.String aSQL,
java.lang.String[] aSQLInserts)
Creates a database exception with a
given severity, and with other information.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDBName() |
java.util.List<java.lang.Integer> |
getIndexesOfFailedBatchOperation() |
java.lang.String |
getMessage()
Gets the exception message in addition to the messages and stack traces of any causes
|
java.lang.String |
getOperation() |
java.lang.String |
getSQL() |
void |
setDBName(java.lang.String aDbName) |
void |
setOperation(java.lang.String aOperation) |
void |
setSQL(java.lang.String aSQL)
Associates this exception with a SQL statement.
|
void |
setSQLInserts(java.lang.String[] aSQLInserts)
Associates this exception with a list of SQL prepared statement
insert values.
|
isLookUpRuleMessages, setLookUpRuleMessages, toString
public static final java.lang.String COPYRIGHT
public static final java.lang.String VERSION
public DatabaseException(java.lang.Throwable aCause, java.lang.String aMsgID, java.lang.String[] aMsgInserts, int aSeverity, java.lang.String aSQL, java.lang.String[] aSQLInserts)
aMsgID
.aCause
- the exception that caused this, or null if noneaMsgID
- the message to reportaMsgInserts
- the message inserts, or null if noneaSeverity
- the severityaSQL
- the SQL we were running when the
problem occurred, or null if noneaSQLInserts
- the inserts for the SQL we
were running, or null if nonepublic DatabaseException(java.lang.Throwable aCause, java.lang.Throwable aSecCause, java.lang.String aMsgID, java.lang.String[] aMsgInserts, int aSeverity, java.lang.String aSQL, java.lang.String[] aSQLInserts)
aMsgID
.aCause
- the exception that caused this, or null if noneaSecCause
- a secondary exception that may have been coveredaMsgID
- the message to reportaMsgInserts
- the message inserts, or null if noneaSeverity
- the severityaSQL
- the SQL we were running when the
problem occurred, or null if noneaSQLInserts
- the inserts for the SQL we
were running, or null if nonepublic DatabaseException(java.lang.Throwable aCause, int aSeverity, java.lang.String aDescr, java.lang.String aSQL, java.lang.String[] aSQLInserts)
Database-General
.aCause
- the exception that caused this, or null if noneaSeverity
- the severityaDescr
- a description of the problemaSQL
- the SQL we were running when the
problem occurred, or null if noneaSQLInserts
- the inserts for the SQL we
were running, or null if nonepublic DatabaseException(java.lang.Throwable aCause, int aSeverity, java.lang.String aDescr, java.lang.String aSQL, java.lang.String[] aSQLInserts, java.lang.String aDBName, java.lang.String aOperation)
Database-General
.aCause
- the exception that caused this, or null if noneaSeverity
- the severityaDescr
- a description of the problemaSQL
- the SQL we were running when the
problem occurred, or null if noneaSQLInserts
- the inserts for the SQL we
were running, or null if noneaDBName
- the database in which the problem occurredaOperation
- the operation during which the problem occurredpublic DatabaseException(java.lang.String aDescr)
aDescr
- the messagepublic DatabaseException(int aSeverity, java.lang.String aDescr)
Database-General
.aSeverity
- the severityaDescr
- the messagepublic DatabaseException(java.lang.Throwable aCause, java.lang.String aDescr)
Database-General
.aCause
- the exception or erroraDescr
- the messagepublic void setSQL(java.lang.String aSQL)
aSQL
- the SQLpublic void setSQLInserts(java.lang.String[] aSQLInserts)
aSQLInserts
- the insert valuespublic java.lang.String getSQL()
public java.lang.String getMessage()
getMessage
in class java.lang.Throwable
public java.lang.String getDBName()
public void setDBName(java.lang.String aDbName)
public java.lang.String getOperation()
public void setOperation(java.lang.String aOperation)
public java.util.List<java.lang.Integer> getIndexesOfFailedBatchOperation()
Copyright © 2018 Pegasystems Inc. All Rights Reserved.