this.searchFactoryImplementor = searchFactoryImplementor;
this.projection = projection;
}
private EntityInfo extract(Document document) {
EntityInfo entityInfo = new EntityInfo();
entityInfo.clazz = DocumentBuilder.getDocumentClass( document );
entityInfo.id = DocumentBuilder.getDocumentId( searchFactoryImplementor, entityInfo.clazz, document );
if ( projection != null && projection.length > 0 ) {
entityInfo.projection = DocumentBuilder.getDocumentFields( searchFactoryImplementor, entityInfo.clazz, document, projection );
}