Process User Defined Fields (UDF).

@param fields field definitions
@param values field values
431894
public void processUserDefinedFields(List<Row> fields, List<Row> values)
   {
      // Process fields
      Map<Integer, String> tableNameMap = new HashMap<Integer, String>();
      for (Row row : fields)
      {
         Integer fieldId = row.getInteger("udf_type_id");
         String tableName = row.getString("table_name");
         tableNameMap.put(fieldId, tableName);

         FieldTypeClass fieldType = FIELD_TYPE_MAP.get(tableName);
         if (fieldType != null)
         {
            String fieldDataType = row.getString("logical_data_type");
            String fieldName = row.getString("udf_type_label");

            m_udfFields.put(fieldId, fieldName);
            addUserDefinedField(fieldType, UserFieldDataType.valueOf(fieldDataType), fieldName);
         }
      }

      // Process values
      for (Row row : values)
      {
         Integer typeID = row.getInteger("udf_type_id");
         String tableName = tableNameMap.get(typeID);
         Map<Integer, List<Row>> tableData = m_udfValues.get(tableName);
         if (tableData == null)
         {
            tableData = new HashMap<Integer, List<Row>>();
            m_udfValues.put(tableName, tableData);
         }

         Integer id = row.getInteger("fk_id");
         List<Row> list = tableData.get(id);
         if (list == null)
         {
            list = new ArrayList<Row>();
            tableData.put(id, list);
         }
         list.add(row);
      }
   }
37213
@Override
    public void setValues(String[] values) {
        if (values == null) {
            this.valuesArray = null;
            this.values = null;
            this.nullValues = true;
        } else if (this.values == null) {
            this.values = new ArrayList<>(Arrays.asList(values));
            this.nullValues = false;
            this.valuesArray = values.clone();
        } else {
            this.nullValues = false;
            this.values.clear();
            for (final String value : values) {
                if (value == null) {
                    this.values.add(NULL_MARKER);
                } else {
                    this.values.add(NullSafeStringColumnMapper.NOT_NULL_PREFIX + value);
                }
            }
            this.valuesArray = values.clone();
        }
    }
1043390
def update(self, values):
        
        for k, v in values.items():
            root, sub = self.split(k)
            if sub is None:
                self.declarations[root] = v
            else:
                self.contexts[root][sub] = v

        extra_context_keys = set(self.contexts) - set(self.declarations)
        if extra_context_keys:
            raise errors.InvalidDeclarationError(
                "Received deep context for unknown fields: %r (known=%r)" % (
                    {
                        self.join(root, sub): v
                        for root in extra_context_keys
                        for sub, v in self.contexts[root].items()
                    },
                    sorted(self.declarations),
                )
            )
133850
public ZealotKhala orIn(String field, Object[] values) {
        return this.doIn(ZealotConst.OR_PREFIX, field, values, true, true);
    }
937751
private static void writeValue(ObjectOutput out, Fieldable field) throws IOException
   {
      Object o = field.stringValue();
      if (o != null)
      {
         // Use writeObject instead of writeUTF because the value could contain unsupported
         // characters
         out.writeObject(o);
         return;
      }
      o = field.tokenStreamValue();
      if (o != null)
      {
         out.writeObject(o);
         return;
      }
      o = field.readerValue();
      throw new RuntimeException("Unsupported value " + o);
   }
991441
public void writeMediumDoubleArray( double[] values ) {
        int byteSize = values.length * 8 + 2;
        this.addUnsignedShort( values.length );
        doWriteDoubleArray( values, byteSize );

    }
269716
private void setSystemField(String fieldName, String value) {
        if (Utils.isEmpty(value)) {
            m_valueMap.remove(fieldName);
        } else {
            m_valueMap.put(fieldName, Arrays.asList(value));
        }
    }
103471
private void processFields() {
    List<Field> children = IntrospectionUtils.getPersistableFields(clazz);
    for (Field child : children) {
      if (child.isAnnotationPresent(Embedded.class)) {
        processEmbeddedField(child);
      } else {
        processSimpleField(child);
      }
    }
  }
466519
public void setCustomFields(Map<String, String> fields) {
        clearCustomFields();
        for (String key : fields.keySet()) {
            CustomField f = new CustomField();
            f.setName(key);
            f.setValue(fields.get(key));
            customFields.add(f);
        }
    }
21352
public ZealotKhala in(String field, Object[] values) {
        return this.doIn(ZealotConst.ONE_SPACE, field, values, true, true);
    }
627138
private void processKeyField(Field field) {
    String fieldName = field.getName();
    Class<?> type = field.getType();
    if (!type.equals(DatastoreKey.class)) {
      String message = String.format("Invalid type, %s, for Key field %s in class %s. ", type,
          fieldName, entityClass);
      throw new EntityManagerException(message);
    }
    KeyMetadata keyMetadata = new KeyMetadata(field);
    entityMetadata.setKeyMetadata(keyMetadata);
  }
1191248
void validateFields(Iterable<Field> fields, List<Reserved> reserveds) {
    Multimap<Integer, Field> tagToField = LinkedHashMultimap.create();
    Multimap<String, Field> nameToField = LinkedHashMultimap.create();
    for (Field field : fields) {
      int tag = field.tag();
      if (!Util.isValidTag(tag)) {
        withContext(field).addError("tag is out of range: %s", tag);
      }

      for (Reserved reserved : reserveds) {
        if (reserved.matchesTag(tag)) {
          withContext(field).addError("tag %s is reserved (%s)", tag, reserved.getLocation());
        }
        if (reserved.matchesName(field.name())) {
          withContext(field).addError("name '%s' is reserved (%s)", field.name(),
              reserved.getLocation());
        }
      }

      tagToField.put(tag, field);
      nameToField.put(field.qualifiedName(), field);
    }

    for (Map.Entry<Integer, Collection<Field>> entry : tagToField.asMap().entrySet()) {
      if (entry.getValue().size() > 1) {
        StringBuilder error = new StringBuilder();
        error.append(String.format("multiple fields share tag %s:", entry.getKey()));
        int index = 1;
        for (Field field : entry.getValue()) {
          error.append(String.format("\n  %s. %s (%s)",
              index++, field.name(), field.location()));
        }
        addError("%s", error);
      }
    }

    for (Collection<Field> collidingFields : nameToField.asMap().values()) {
      if (collidingFields.size() > 1) {
        Field first = collidingFields.iterator().next();
        StringBuilder error = new StringBuilder();
        error.append(String.format("multiple fields share name %s:", first.name()));
        int index = 1;
        for (Field field : collidingFields) {
          error.append(String.format("\n  %s. %s (%s)",
              index++, field.name(), field.location()));
        }
        addError("%s", error);
      }
    }
  }
112599
private void processUDF(UDFTypeType udf)
   {
      FieldTypeClass fieldType = FIELD_TYPE_MAP.get(udf.getSubjectArea());
      if (fieldType != null)
      {
         UserFieldDataType dataType = UserFieldDataType.getInstanceFromXmlName(udf.getDataType());
         String name = udf.getTitle();
         FieldType field = addUserDefinedField(fieldType, dataType, name);
         if (field != null)
         {
            m_fieldTypeMap.put(udf.getObjectId(), field);
         }
      }
   }
992679
protected void extractValues(HashMap<String, String> values) {
        for (Iterator<SyntaxElement> i = elements.listIterator(); i.hasNext(); ) {
            i.next().extractValues(values);
        }
    }
44406
private static List<String> resolveValues(final Iterable<? extends String> values) {
        final List<String> valuesList = new ArrayList<String>();

        for(final String value : values) {
            Validate.notNull(value, "One of the specified values was null");
            valuesList.add(value);
        }

        return valuesList;
    }
818183
void buildFieldDescriptors(Field[] declaredFields) {
        // We could find the field ourselves in the collection, but calling
        // reflect is easier. Optimize if needed.
        final Field f = ObjectStreamClass.fieldSerialPersistentFields(this.forClass());
        // If we could not find the emulated fields, we'll have to compute
        // dumpable fields from reflect fields
        boolean useReflectFields = f == null; // Assume we will compute the
        // fields to dump based on the
        // reflect fields

        ObjectStreamField[] _fields = null;
        if (!useReflectFields) {
            // The user declared a collection of emulated fields. Use them.
            // We have to be able to fetch its value, even if it is private
            f.setAccessible(true);
            try {
                // static field, pass null
                _fields = (ObjectStreamField[]) f.get(null);
            } catch (IllegalAccessException ex) {
                throw new AssertionError(ex);
            }
        } else {
            // Compute collection of dumpable fields based on reflect fields
            List<ObjectStreamField> serializableFields =
                    new ArrayList<ObjectStreamField>(declaredFields.length);
            // Filter, we are only interested in fields that are serializable
            for (Field declaredField : declaredFields) {
                int modifiers = declaredField.getModifiers();
                if (!Modifier.isStatic(modifiers) && !Modifier.isTransient(modifiers)) {
                    ObjectStreamField field = new ObjectStreamField(declaredField.getName(),
                            declaredField.getType());
                    serializableFields.add(field);
                }
            }

            if (serializableFields.size() == 0) {
                _fields = NO_FIELDS; // If no serializable fields, share the
                // special value so that users can test
            } else {
                _fields = serializableFields.toArray(new ObjectStreamField[serializableFields.size()]);
            }
        }
        Arrays.sort(_fields);
        // assign offsets
        int primOffset = 0, objectOffset = 0;
        for (int i = 0; i < _fields.length; i++) {
            Class<?> type = _fields[i].getType();
            if (type.isPrimitive()) {
                _fields[i].offset = primOffset;
                primOffset += primitiveSize(type);
            } else {
                _fields[i].offset = objectOffset++;
            }
        }
        fields = _fields;
    }
1234526
public void setFields(java.util.Collection<Field> fields) {
        if (fields == null) {
            this.fields = null;
            return;
        }

        this.fields = new com.amazonaws.internal.SdkInternalList<Field>(fields);
    }