public void setId ( String id ) { if ( StringUtils . isNullOrBlank ( id ) ) { this . id = UUID . randomUUID ( ) . toString ( ) ; } else { this . id = id ; } }
Sets the id of the document . If a null or blank id is given a random id will generated .