taskManagerApiRest/src/main/java/com/salvador/thiago/taskManagerApiRest/service/TaskService.java
public Page<TaskDto> findPage(Integer page, Integer linesPerPage, String orderBy, String direction) {
		PageRequest pageRequest =PageRequest.of(page, linesPerPage, Direction.valueOf(direction), orderBy);
		Page<Task> tasks = repository.findAll(pageRequest);
		Page<TaskDto> dto = ObjectMapperUtils.mapAllPage(tasks, TaskDto.class);
		return dto;
	}
/**
	   * <p> Method responsible for paginating all tasks and 
	   * sending and validating data received from the 
	   * persistence layer.
	   * 
	   * Maps one object to another using modelMapper
	   * <p>
	   *  
	   * @param Integer page, Integer linesPerPage, String orderBy, String direction
	   * @return Page<TaskDto>
	   */
 Method responsible for paginating all tasks and
sending and validating data received from the
persistence layer.

Maps one object to another using modelMapper


@param Integer page, Integer linesPerPage, String orderBy, String direction
@return Page
Method responsible for paginating all tasks and sending and validating data received from the persistence layer . Maps one object to another using modelMapper @param Integer page Integer linesPerPage String orderBy String direction @return Page
public Page<TaskDto> findPage(Integer page, Integer linesPerPage, String orderBy, String direction) {
		PageRequest pageRequest =PageRequest.of(page, linesPerPage, Direction.valueOf(direction), orderBy);
		Page<Task> tasks = repository.findAll(pageRequest);
		Page<TaskDto> dto = ObjectMapperUtils.mapAllPage(tasks, TaskDto.class);
		return dto;
	}
public Page < TaskDto > findPage ( Integer page , Integer linesPerPage , String orderBy , String direction ) { PageRequest pageRequest = PageRequest . of ( page , linesPerPage , Direction . valueOf ( direction ) , orderBy ) ; Page < Task > tasks = repository . findAll ( pageRequest ) ; Page < TaskDto > dto = ObjectMapperUtils . mapAllPage ( tasks , TaskDto . class ) ; return dto ; }
<p> Method responsible for paginating all tasks and
 sending and validating data received from the
 persistence layer.
<p > Method responsible for paginating all tasks and sending and validating data received from the persistence layer .