src/main/java/br/eng/joaofaro/taskmanager/repository/service/TaskService.java
/**
     * <p>Method responsible to update a <code>task</code></p>
     * @param task - task object
     * @throws TaskManagerException - throws a exception to handle result
     */
Method responsible to update a task
@param task - task object
@throws TaskManagerException - throws a exception to handle result
Method responsible to update a task @param task - task object @throws TaskManagerException - throws a exception to handle result
public void saveAndFlush(Task task) throws TaskManagerException {
        log.info("Trying to save task into database");
        try {
            repository.saveAndFlush(task);
        }catch (Exception e) {
            log.error("Error when trying to save task into database: {}", e.getMessage());
            throw new TaskManagerException("Error when trying to save task into database: " + e.getMessage());
        }
    }
public void saveAndFlush ( Task task ) throws TaskManagerException { log . info ( "Trying to save task into database" ) ; try { repository . saveAndFlush ( task ) ; } catch ( Exception e ) { log . error ( "Error when trying to save task into database: {}" , e . getMessage ( ) ) ; throw new TaskManagerException ( "Error when trying to save task into database: " + e . getMessage ( ) ) ; } }
<p>Method responsible to update a <code>task</code></p>
 @param task - task object
 @throws TaskManagerException - throws a exception to handle result
<p > Method responsible to update a <code > task< / code > < / p > @param task - task object @throws TaskManagerException - throws a exception to handle result