private Object populateEntityFromHBaseData ( Object entity , HBaseDataWrapper hbaseData , EntityMetadata m , Object rowKey ) { try { Map < String , Object > relations = new HashMap < String , Object > ( ) ; if ( entity . getClass ( ) . isAssignableFrom ( EnhanceEntity . class ) ) { relations = ( ( EnhanceEntity ) entity ) . getRelations ( ) ; entity = ( ( EnhanceEntity ) entity ) . getEntity ( ) ; } MetamodelImpl metaModel = ( MetamodelImpl ) kunderaMetadata . getApplicationMetadata ( ) . getMetamodel ( m . getPersistenceUnit ( ) ) ; EntityType entityType = metaModel . entity ( m . getEntityClazz ( ) ) ; Set < Attribute > attributes = ( ( AbstractManagedType ) entityType ) . getAttributes ( ) ; writeValuesToEntity ( entity , hbaseData , m , metaModel , attributes , m . getRelationNames ( ) , relations , - 1 , "" ) ; if ( ! relations . isEmpty ( ) ) { return new EnhanceEntity ( entity , rowKey , relations ) ; } return entity ; } catch ( PropertyAccessException e1 ) { throw new RuntimeException ( e1 ) ; } }
Populate entity from hBase data .