Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private String getDocumentNameWithSuffix(final String prefix) {
- boolean done = false;
- String suffix = StringUtils.EMPTY;
- suffix = nextString(suffix);
- String docName = prefix + suffix;
- do {
- suffix = nextString(suffix);
- docName = prefix + suffix;
- } while(emh.query().from(document).where(document.name.eq(docName)).exists());
- return prefix + suffix;
- }
Add Comment
Please, Sign In to add comment