Class SQLExceptionConvertorBase
- java.lang.Object
-
- jetbrains.buildServer.serverSide.db.SQLExceptionConvertorBase
-
- All Implemented Interfaces:
SQLExceptionConvertor
public abstract class SQLExceptionConvertorBase extends Object implements SQLExceptionConvertor
Converts aSQLExceptionto aDBException. A stateless service object.
-
-
Constructor Summary
Constructors Constructor Description SQLExceptionConvertorBase()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DBExceptionconvertSQLException(String operation, SQLException sqle)ConvertsSQLExceptiontoDBException.DBExceptionconvertSQLException(String operation, SQLException sqle, String query)ConvertsSQLExceptiontoDBException.static SQLExceptionConvertorBasegetConvertor(DatabaseType dbType)Provides with the instance of exception convertor that is appropriate for the specified DBMS.
-
-
-
Method Detail
-
getConvertor
@NotNull public static SQLExceptionConvertorBase getConvertor(DatabaseType dbType)
Provides with the instance of exception convertor that is appropriate for the specified DBMS.- Parameters:
dbType- DBMS.- Returns:
- appropriate convertor.
-
convertSQLException
@NotNull public final DBException convertSQLException(@NotNull String operation, @NotNull SQLException sqle)
ConvertsSQLExceptiontoDBException.- Specified by:
convertSQLExceptionin interfaceSQLExceptionConvertor- Parameters:
operation- operation that occured this exception (a human readable text).sqle- the SQL exception to convert.- Returns:
- converted DB exception.
-
convertSQLException
@NotNull public final DBException convertSQLException(@NotNull String operation, @NotNull SQLException sqle, @Nullable String query)
ConvertsSQLExceptiontoDBException.- Specified by:
convertSQLExceptionin interfaceSQLExceptionConvertor- Parameters:
operation- operation that occured this exception (a human readable text).sqle- the SQL exception to convert.query- SQL query that couses this exception.- Returns:
- converted DB exception.
-
-