private void processEmbeddable ( Object entity , HBaseDataWrapper hbaseData , EntityMetadata m , MetamodelImpl metaModel , int count , String prefix , Attribute attribute , Class javaType ) { Set < Attribute > attribEmbeddables = metaModel . embeddable ( javaType ) . getAttributes ( ) ; Object embeddedField = KunderaCoreUtils . createNewInstance ( javaType ) ; if ( ! attribute . isCollection ( ) ) { String newPrefix = prefix != "" ? prefix + ( ( AbstractAttribute ) attribute ) . getJPAColumnName ( ) + HBaseUtils . DOT : ( ( AbstractAttribute ) attribute ) . getJPAColumnName ( ) + HBaseUtils . DOT ; writeValuesToEntity ( embeddedField , hbaseData , m , metaModel , attribEmbeddables , null , null , count , newPrefix ) ; PropertyAccessorHelper . set ( entity , ( Field ) attribute . getJavaMember ( ) , embeddedField ) ; } else { int newCount = count + 1 ; String newPrefix = prefix != "" ? prefix + ( ( AbstractAttribute ) attribute ) . getJPAColumnName ( ) + HBaseUtils . DELIM : ( ( AbstractAttribute ) attribute ) . getJPAColumnName ( ) + HBaseUtils . DELIM ; List embeddedCollection = new ArrayList ( ) ; byte [ ] columnValue = hbaseData . getColumnValue ( HBaseUtils . getColumnDataKey ( m . getTableName ( ) , newPrefix + HBaseUtils . SIZE ) ) ; int size = 0 ; if ( columnValue != null ) { size = Bytes . toInt ( columnValue ) ; } while ( size != newCount ) { embeddedField = KunderaCoreUtils . createNewInstance ( javaType ) ; writeValuesToEntity ( embeddedField , hbaseData , m , metaModel , attribEmbeddables , null , null , newCount ++ , newPrefix ) ; embeddedCollection . add ( embeddedField ) ; } PropertyAccessorHelper . set ( entity , ( Field ) attribute . getJavaMember ( ) , embeddedCollection ) ; } }
Process embeddable .