@ SuppressWarnings ( "unchecked" ) public String generateDocumentId ( String databaseName , Object entity ) { Class < ? > clazz = entity . getClass ( ) ; for ( Tuple < Class , BiFunction < String , Object , String > > listOfRegisteredIdConvention : _listOfRegisteredIdConventions ) { if ( listOfRegisteredIdConvention . first . isAssignableFrom ( clazz ) ) { return listOfRegisteredIdConvention . second . apply ( databaseName , entity ) ; } } return _documentIdGenerator . apply ( databaseName , entity ) ; }
Generates the document id .