List<RouteProduct> routeProductList = routeProductRepository.findAll()
.stream().filter(
rp -> rp.getSequence().equals(
rp.getRouteOrdering().getPresent()
)
&&
rp.getProject()!=null?
!rp.getProject().isDeleted()
&& !rp.getProject().isDropped() && !rp.getProject().isPending()
: true
).collect(Collectors.toList());
내가 사용하고 있던 filter
List<RouteProduct> routeProductList = routeProductRepository.findAll().stream()
.filter(
rp -> rp.getSequence().equals(
rp.getRouteOrdering().getPresent()
)
).filter(
rp ->
rp.getProject()!=null?
!rp.getProject().isDeleted() && !rp.getProject().isDropped() && !rp.getProject().isPending()
: true
).collect(Collectors.toList());