private Object setElementCollectionList ( ListType listType , ByteBuffer thriftColumnValue , Object entity , Field field , MetamodelImpl metaModel , Class embeddedClass , boolean useNativeProtocol2 ) { ListSerializer listSerializer = listType . getSerializer ( ) ; Collection outputCollection = new ArrayList ( ) ; if ( useNativeProtocol2 ) { outputCollection . addAll ( ( Collection ) listSerializer . deserializeForNativeProtocol ( thriftColumnValue , ProtocolVersion . V2 ) ) ; } else { outputCollection . addAll ( ( Collection ) listSerializer . deserialize ( thriftColumnValue ) ) ; } UserType usertype = ( UserType ) listType . getElementsType ( ) ; Collection result = new ArrayList ( ) ; Iterator collectionItems = outputCollection . iterator ( ) ; while ( collectionItems . hasNext ( ) ) { Object embeddedObject = KunderaCoreUtils . createNewInstance ( embeddedClass ) ; Object value = populateEmbeddedRecursive ( ( ByteBuffer ) collectionItems . next ( ) , usertype . allTypes ( ) , usertype . fieldNames ( ) , embeddedObject , metaModel ) ; result . add ( value ) ; } PropertyAccessorHelper . set ( entity , field , result ) ; return entity ; }
Sets the element collection list .