Given a list of field names, this will set all those fields to default
to null.
@param mixed $fieldNames - either an array of field names or a single
field name string
774744
public function setDefaultNull($fieldNames)
    {
        if (is_array($fieldNames))
        {
            foreach ($fieldNames as $field_name)
            {
                $this->setDefaultNull($field_name);
            }
        }
        else
        {
            if (isset($this->m_fields[$fieldNames]))
            {
                $this->m_fields[$fieldNames]->setDefault('NULL');
            }
            else
            {
                $err_msg = '[' . $fieldNames . '] field not found in table ' .
                           '[' . $this->m_name . '] when setting null fields';

                throw new \Exception($err_msg);
            }
        }
    }
1058681
public function setFromArray(array $fields)
    {
        foreach($fields as $key => $value)
        {
                $this->fields[$key] = $value;
                unset($key);
                unset($value);
        }
    }
968384
protected function setFieldResults(array $fieldResults)
    {
        foreach ($fieldResults as $fieldName => $validationResult) {
            $this->setFieldResult($fieldName, $validationResult);
        }
    }
967870
public function SetField($FieldName) {
      $Config = Gdn::Factory(Gdn::AliasConfig);
      if (is_array($FieldName) === FALSE)
         $FieldName = array($FieldName);

      foreach($FieldName as $Index => $Value) {
         if(is_numeric($Index)) {
            $NameKey = $Value;
            $Default = '';
         } else {
            $NameKey = $Index;
            $Default = $Value;
         }
         /*
         if ($this->Name != 'Configuration')
            $Name = $NameKey;
         else
            $Name = $this->Name.'.'.$NameKey;
         */

         $this->Data[$NameKey] = $Config->Get($NameKey, $Default);
      }
   }
598246
protected function setPostFields (array $fields)
	{
		foreach ($fields as $key => $value) $this->fields[$key] = $value;
	}
484049
public function fields($fields)
    {
        if (is_array($fields) || $fields === null) {
            $this->fields = $fields;
        } else {
            $this->fields = func_get_args();
        }
        return $this;
    }
1355582
public function fillObject( $comment, $fieldNames = null )
    {
        $filledFields = $this->fields;
        if ( !is_null( $fieldNames ) && is_array( $fieldNames ) )
        {
            $filledFields = array();
            foreach ( $fieldNames as $fieldName )
            {
                $filledFields[$fieldName] = $this->fields[$fieldName];
            }
        }
        foreach ( $filledFields as $field => $fieldSetup )
        {
            $attributeName = $fieldSetup[self::ATTRIBUTENAME];
            if ( !is_null( $attributeName ) )
            {
                $fieldValue = $this->fieldValues[$field];
                $comment->setAttribute( $attributeName, $fieldValue );
            }
        }
    }
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);
    }
9381
public Entity setFieldNames(String... fieldNames) {
		if (ArrayUtil.isNotEmpty(fieldNames)) {
			this.fieldNames = CollectionUtil.newHashSet(fieldNames);
		}
		return this;
	}
1098839
public function delFieldsArray(array $fields)
	{
	        foreach ($fields as $field) {
                        $this->_redis->hdel($this->_key, $field);
                }
	}
690946
public static void setFieldNames(@NonNull String... names) {
      Config.setProperty(CONFIG_PROPERTY + ".fields",
                         Joiner.on(',').join(names));
   }
500092
public function addFields($fields = [], $defaults = [])
    {
        foreach ($fields as $field) {
            if (is_string($field)) {
                $this->addField($field, $defaults);
                continue;
            }

            if (is_array($field) && isset($field[0])) {
                $name = $field[0];
                unset($field[0]);
                $this->addField($name, $field);
                continue;
            }
        }

        return $this;
    }
749422
public static function setNames(array $names)
    {
        if(static::$isInited)
        {
            throw new \RuntimeException('addName failed, ChannelManager was inited');
        }
        foreach($names as $key => $args)
        {
            static::$channels[$key] = $args;
        }
    }
1275615
public function setFields(array $fields)
    {
        foreach ($fields as $key => $field) {
            $this->setField($key, $field);
        }

        return $this;
    }
340015
protected function setFieldset($values)
    {
        foreach ($values as $name => $field) {
            $this->fields[$name] = $field;
        }
    }
748998
public function setFields(array $fields)
    {
        $this->fields = $fields;
        $this->queryBuilder->select(implode(', ', $fields));
        return $this;
    }
416032
public function applyDefaults(array $defaults = [])
    {
        array_map(function ($key) use ($defaults) {
            $this->set($key, $this->get($key, $defaults[$key]));
        }, array_keys($defaults));
    }