Package org.mariadb.jdbc.util.exceptions
Class ExceptionFactory
java.lang.Object
org.mariadb.jdbc.util.exceptions.ExceptionFactory
- Direct Known Subclasses:
ExceptionFactory.SqlExceptionFactory
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Configuration
private Connection
private final HostAddress
private MariaDbPoolConnection
private Statement
private long
-
Constructor Summary
ConstructorsModifierConstructorDescriptionExceptionFactory
(Configuration conf, HostAddress hostAddress) private
ExceptionFactory
(Connection connection, MariaDbPoolConnection poolConnection, Configuration conf, HostAddress hostAddress, long threadId, Statement statement) -
Method Summary
Modifier and TypeMethodDescriptionprivate static String
buildMsgText
(String initialMessage, long threadId, Configuration conf, String sql, int errorCode, Connection connection) createBatchUpdate
(List<Completion> res, int length, int[] responseMsg, SQLException sqle) createBatchUpdate
(List<Completion> res, int length, SQLException sqle) private SQLException
createException
(String initialMessage, String sqlState, int errorCode, Exception cause) getSql()
notSupported
(String message) setConnection
(Connection connection) void
setConnection
(ExceptionFactory oldExceptionFactory) setPoolConnection
(MariaDbPoolConnection internalPoolConnection) void
setThreadId
(long threadId)
-
Field Details
-
LOCK_DEADLOCK_ERROR_CODES
-
conf
-
hostAddress
-
connection
-
poolConnection
-
threadId
private long threadId -
statement
-
-
Constructor Details
-
ExceptionFactory
-
ExceptionFactory
private ExceptionFactory(Connection connection, MariaDbPoolConnection poolConnection, Configuration conf, HostAddress hostAddress, long threadId, Statement statement)
-
-
Method Details
-
buildMsgText
private static String buildMsgText(String initialMessage, long threadId, Configuration conf, String sql, int errorCode, Connection connection) -
setConnection
-
setConnection
-
setPoolConnection
-
setThreadId
public void setThreadId(long threadId) -
createBatchUpdate
-
createBatchUpdate
public BatchUpdateException createBatchUpdate(List<Completion> res, int length, int[] responseMsg, SQLException sqle) -
of
-
withSql
-
createException
private SQLException createException(String initialMessage, String sqlState, int errorCode, Exception cause) -
notSupported
-
create
-
create
-
create
-
create
-
getSql
-