Guest User

Untitled

a guest
Jun 19th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.40 KB | None | 0 0
  1.   private String getDocumentNameWithSuffix(final String prefix) {
  2.     boolean done = false;
  3.     String suffix = StringUtils.EMPTY;
  4.     suffix = nextString(suffix);
  5.     String docName = prefix + suffix;
  6.     do {
  7.       suffix = nextString(suffix);
  8.       docName = prefix + suffix;  
  9.     } while(emh.query().from(document).where(document.name.eq(docName)).exists());
  10.     return prefix + suffix;
  11.   }
Add Comment
Please, Sign In to add comment