private Object setElementCollectionMap ( MapType mapType , ByteBuffer thriftColumnValue , Object entity , Field field , MetamodelImpl metaModel , Class embeddedClass , boolean useNativeProtocol2 ) { Map result = new HashMap ( ) ; MapSerializer mapSerializer = mapType . getSerializer ( ) ; Map outputCollection = new HashMap ( ) ; if ( useNativeProtocol2 ) { outputCollection . putAll ( mapSerializer . deserializeForNativeProtocol ( thriftColumnValue , ProtocolVersion . V2 ) ) ; } else { outputCollection . putAll ( ( Map ) mapSerializer . deserialize ( thriftColumnValue ) ) ; } UserType usertype = ( UserType ) mapType . getValuesType ( ) ; for ( Object key : outputCollection . keySet ( ) ) { Object embeddedObject = KunderaCoreUtils . createNewInstance ( embeddedClass ) ; Object value = populateEmbeddedRecursive ( ( ByteBuffer ) outputCollection . get ( key ) , usertype . allTypes ( ) , usertype . fieldNames ( ) , embeddedObject , metaModel ) ; result . put ( key , value ) ; } PropertyAccessorHelper . set ( entity , field , result ) ; return entity ; }
Sets the element collection map .