I am trying to use Spring JPA example to do a search. With the following code, most of them meet the requirements.
public Page<Shop> findShops(Shop condition, Pageable pageable) {
ExampleMatcher matcher = ExampleMatcher.matching().withStringMatcher(StringMatcher.CONTAINING).withIgnoreCase();
return shopDao.findAll(Example.of(condition, matcher), pageable);
}
Also, I ONLY need a STORE with the status NOT equals DELETED. Something like .withMatcher("status", notEqual())
or maybe a .withMatcher("status", contains())list.
I'm not sure how and as an example Matcher could do such a thing. Can someone help me with this?
source
share