if ( builderIndexedEntity == null ) {
throw new SearchException( "No Lucene configuration set up for: " + clazz.getName() );
}
final int fieldNbr = fields.length;
Object[] result = new Object[fieldNbr];
ContextualException2WayBridge contextualBridge = new ContextualException2WayBridge();
contextualBridge.setClass( clazz );
if ( builderIndexedEntity.getIdKeywordName() != null ) {
final XMember member = builderIndexedEntity.getIdGetter();
if ( member != null ) {
contextualBridge.pushMethod( member.getName() );
}
populateResult(
builderIndexedEntity.getIdKeywordName(),
builderIndexedEntity.getIdBridge(),
Store.YES,
fields,
result,
document,
contextualBridge
);
if ( member != null ) {
contextualBridge.popMethod();
}
}
final AbstractDocumentBuilder.PropertiesMetadata metadata = builderIndexedEntity.getMetadata();
processFieldsForProjection( metadata, fields, result, document, contextualBridge );