code: public static ResourceException translateSQLException(
                                                                    SQLException se,
                                                                    Object mapper,
                                                                    boolean sendEvent,
                                                                    Class<?> caller) {
          return (ResourceException) mapException(
                                                          new DataStoreAdapterException("DSA_ERROR", se, caller, se.getMessage()),
                                                          null,
                                                          mapper,
                                                          sendEvent);
      }
docs: Translates a SQLException from the database. The exception mapping methods
  have been rewritten to account for the error detection model and to consolidate
  the RRA exception mapping routines into a single place.
  See the AdapterUtil.mapException method.
  
  @param SQLException se - the SQLException from the database
  @param mapper a managed connection or managed connection factory capable of mapping
  the exception. If NULL is provided, the exception cannot be mapped.
  If stale statement handling or connection error handling is required then a
  managed connection must be provided.
  @param boolean sendEvent - if true, throw an exception if the SQLException is a
  connectionError event
  @return ResourceException - the translated SQLException wrapped in a
  ResourceException