Created
May 30, 2018 18:35
-
-
Save gajoseph/fb115cac5a45c8d0745a178bb20a3404 to your computer and use it in GitHub Desktop.
Java lambdaexpression ::Sharing some sample landa express to pull all ids in this cause distinct and separated by commas like ('1','2')
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sharing some sample landa express to pull all ids in this cause distinct and separated by commas like ('1','2') | |
In this example a tab(table) object has list of parentId_pkids which is collection of fkids() and under each fkid object there is collection of string | |
NOdeleet = NOdeleet + tab.parentId_pkids.fkids().stream() | |
.map(fkid -> fkid.Pks.stream() | |
.filter(ids -> !ids.deleteable) | |
.map(ids -> ids.Pkids.stream() | |
.map(Object::toString) | |
.collect(Collectors.joining("','")) | |
) | |
.collect(Collectors.joining("','"))) | |
.distinct() | |
.collect(Collectors.joining("','", "('", "')")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment