taskManagerApiRest/src/main/java/com/salvador/thiago/taskManagerApiRest/service/TaskService.java
public TaskDto findById(Long id) {
		Task task = new Task();
		if (this.findByIdEntity(id) != null) {
			task = this.findByIdEntity(id);
		}
		TaskDto taskDto = modelMapper.map(task, TaskDto.class);
		return taskDto;
	}
/**
	   * <p> Method responsible for fetching a task by id by
	   * and sending and validating data received from the
	   * persistence layer.
	   * 
	   * Maps one object to another using modelMapper
	   * <p>
	   *  
	   * @param Long id
	   * @return TaskDto
	   */
 Method responsible for fetching a task by id by
and sending and validating data received from the
persistence layer.

Maps one object to another using modelMapper


@param Long id
@return TaskDto
Method responsible for fetching a task by id by and sending and validating data received from the persistence layer . Maps one object to another using modelMapper @param Long id @return TaskDto
public TaskDto findById(Long id) {
		Task task = new Task();
		if (this.findByIdEntity(id) != null) {
			task = this.findByIdEntity(id);
		}
		TaskDto taskDto = modelMapper.map(task, TaskDto.class);
		return taskDto;
	}
public TaskDto findById ( Long id ) { Task task = new Task ( ) ; if ( this . findByIdEntity ( id ) != null ) { task = this . findByIdEntity ( id ) ; } TaskDto taskDto = modelMapper . map ( task , TaskDto . class ) ; return taskDto ; }
<p> Method responsible for fetching a task by id by
 and sending and validating data received from the
 persistence layer.
<p > Method responsible for fetching a task by id by and sending and validating data received from the persistence layer .