Example usage for org.hibernate NonUniqueObjectException getMessage

List of usage examples for org.hibernate NonUniqueObjectException getMessage

Introduction

In this page you can find the example usage for org.hibernate NonUniqueObjectException getMessage.

Prototype

@Override
    public String getMessage() 

Source Link

Usage

From source file:com.rx4dr.service.controller.RestExceptionHandler.java

@ExceptionHandler(NonUniqueObjectException.class)
public ResponseEntity<Map<String, Object>> NonUniqueObjectExceptionHandler(NonUniqueObjectException e) {
    logger.debug("Enyeting JDBCConnectionException");
    Map<String, Object> map = new HashMap<String, Object>();
    map.put(status, "500");
    map.put(error, e.getClass().getSimpleName());
    map.put(description, e.getMessage());
    return new ResponseEntity<Map<String, Object>>(map, HttpStatus.OK);
}