Package io.ebean.config.dbplatform
Class SqlCodeTranslator
- java.lang.Object
-
- io.ebean.config.dbplatform.SqlCodeTranslator
-
- All Implemented Interfaces:
SqlExceptionTranslator
public class SqlCodeTranslator extends Object implements SqlExceptionTranslator
Translate SQLException based on SQLState codes.
-
-
Constructor Summary
Constructors Constructor Description SqlCodeTranslator()
Create "No-op" implementation.SqlCodeTranslator(Map<String,DataErrorType> map)
Create given the map of SQLState codes to error types.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.persistence.PersistenceException
translate(String message, SQLException e)
Translate the given exception.
-
-
-
Constructor Detail
-
SqlCodeTranslator
public SqlCodeTranslator(Map<String,DataErrorType> map)
Create given the map of SQLState codes to error types.
-
SqlCodeTranslator
public SqlCodeTranslator()
Create "No-op" implementation.
-
-
Method Detail
-
translate
public javax.persistence.PersistenceException translate(String message, SQLException e)
Description copied from interface:SqlExceptionTranslator
Translate the given exception.- Specified by:
translate
in interfaceSqlExceptionTranslator
-
-