private List getEntityObjects ( Class clazz , final EntityMetadata entityMetadata , EntityType entityType , SearchHits hits ) { List results = new ArrayList ( ) ; Object entity = null ; for ( SearchHit hit : hits . getHits ( ) ) { entity = KunderaCoreUtils . createNewInstance ( clazz ) ; Map < String , Object > hitResult = hit . sourceAsMap ( ) ; results . add ( wrap ( hitResult , entityType , entity , entityMetadata , false ) ) ; } return results ; }
Gets the entity objects .