ConversionContext conversionContext, Serializable id, Class<?> clazz, EntityIndexBinder entityIndexBinding) {
DocumentBuilderIndexedEntity docBuilder = entityIndexBinding.getDocumentBuilder();
String idInString = idInString( conversionContext, id, clazz, docBuilder );
// depending on the complexity of the object graph going to be indexed it's possible
// that we hit the database several times during work construction.
return docBuilder.createAddWork( clazz, entity, id, idInString, sessionInitializer, conversionContext );
}
private String idInString(ConversionContext conversionContext, Serializable id, Class<?> clazz,
DocumentBuilderIndexedEntity docBuilder) {
conversionContext.pushProperty( docBuilder.getIdKeywordName() );