}
public UpdateLuceneWork createUpdateWork(Class<T> entityClass, T entity, Serializable id, String idInString, InstanceInitializer sessionInitializer, ConversionContext contextualBridge) {
Map<String, String> fieldToAnalyzerMap = new HashMap<String, String>();
Document doc = getDocument( entity, id, fieldToAnalyzerMap, sessionInitializer, contextualBridge, null );
final UpdateLuceneWork addWork;
if ( fieldToAnalyzerMap.isEmpty() ) {
addWork = new UpdateLuceneWork( id, idInString, entityClass, doc );
}
else {
addWork = new UpdateLuceneWork( id, idInString, entityClass, doc, fieldToAnalyzerMap );
}
return addWork;
}