Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save pavankjadda/baafb266082db06b3b197cf1121eedfa to your computer and use it in GitHub Desktop.
Save pavankjadda/baafb266082db06b3b197cf1121eedfa to your computer and use it in GitHub Desktop.
Second Predicate.md
//Predicate for Employee Projects data
  Predicate predicateForData = criteriaBuilder.or(
      criteriaBuilder.like(root.get("firstName"), "%" + employeeRequestDTO.getFilterText() + "%"),
      criteriaBuilder.like(root.get("lastName"), "%" + employeeRequestDTO.getFilterText() + "%"),
      criteriaBuilder.like(root.get("projectId").as(String.class), "%" + employeeRequestDTO.getFilterText() + "%"),
      criteriaBuilder.like(root.get("projectName"), "%" + employeeRequestDTO.getFilterText() + "%"),
      criteriaBuilder.like(root.get("projectBudget").as(String.class), "%" + employeeRequestDTO.getFilterText() + "%"),
      criteriaBuilder.like(root.get("projectLocation"), "%" + employeeRequestDTO.getFilterText() + "%"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment