protected void addEntityFieldsToDocument ( EntityMetadata metadata , Object entity , Document document , MetamodelImpl metaModel ) { String indexName = metadata . getIndexName ( ) ; Map < String , PropertyIndex > indexProperties = metadata . getIndexProperties ( ) ; for ( String columnName : indexProperties . keySet ( ) ) { PropertyIndex index = indexProperties . get ( columnName ) ; java . lang . reflect . Field property = index . getProperty ( ) ; String propertyName = index . getName ( ) ; addFieldToDocument ( entity , document , property , propertyName , indexName ) ; } if ( metaModel . isEmbeddable ( metadata . getIdAttribute ( ) . getBindableJavaType ( ) ) ) { Object id = PropertyAccessorHelper . getId ( entity , metadata ) ; EmbeddableType embeddableId = metaModel . embeddable ( metadata . getIdAttribute ( ) . getBindableJavaType ( ) ) ; Set < Attribute > embeddedAttributes = embeddableId . getAttributes ( ) ; indexCompositeKey ( embeddedAttributes , metadata , id , document , metaModel ) ; } }
Adds the index properties .