Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save pavankjadda/c6100c6726dadb2c6adbc89eae5457e1 to your computer and use it in GitHub Desktop.
Save pavankjadda/c6100c6726dadb2c6adbc89eae5457e1 to your computer and use it in GitHub Desktop.
Multi Column Search - findEmployeeProjectsBySpecification.md
@Override
public Page<EmployeeProjectView> findEmployeeProjectsBySpecification(EmployeeRequestDTO employeeRequestDTO)
{
  return employeeProjectViewRepository.findAll(getSpecification(employeeRequestDTO), PageRequest.of(employeeRequestDTO.getCurrentPageNumber(), employeeRequestDTO.getPageSize(),
      Sort.by(isNotNullOrEmpty(employeeRequestDTO.getSortDirection()) ? Sort.Direction.fromString(employeeRequestDTO.getSortDirection()) : Sort.Direction.DESC, employeeRequestDTO.getSortColumnName())));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment