code: private Object setElementCollectionSet(SetType setType, ByteBuffer thriftColumnValue, Object entity, Field field,
              MetamodelImpl metaModel, Class embeddedClass, boolean useNativeProtocol2)
      {
  
          SetSerializer setSerializer = setType.getSerializer();
          Collection outputCollection = new ArrayList();
          if (useNativeProtocol2)
          {
              outputCollection.addAll((Collection) setSerializer.deserializeForNativeProtocol(thriftColumnValue, ProtocolVersion.V2));
          }
          else
          {
              outputCollection.addAll((Collection) setSerializer.deserialize(thriftColumnValue));
          }
  
          UserType usertype = (UserType) setType.getElementsType();
          Collection result = new HashSet();
          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;
      }
docs: Sets the element collection set.
  
  @param setType
  the cql column metadata
  @param thriftColumnValue
  the thrift column value
  @param entity
  the entity
  @param field
  the field
  @param metaModel
  the meta model
  @param embeddedClass
  the embedded class
  @param useNativeProtocol2
  the use native protocol2
  @return the object