Skip to content

Commit

Permalink
Add distinct specification to QueryService
Browse files Browse the repository at this point in the history
  • Loading branch information
egvimo committed Aug 10, 2021
1 parent 54103bd commit 80edbb0
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -527,4 +527,17 @@ protected String wrapLikeQuery(String txt) {
return "%" + txt.toUpperCase() + '%';
}

/**
* <p>distinct.</p>
*
* @param distinct a boolean.
* @return a {@link org.springframework.data.jpa.domain.Specification} object.
*/
protected Specification<ENTITY> distinct(boolean distinct) {
return (root, query, cb) -> {
query.distinct(distinct);
return null;
};
}

}

0 comments on commit 80edbb0

Please sign in to comment.