Class BaseFieldSet

    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      BaseFieldSet setField​(java.lang.String key, java.lang.Object value)
      Deprecated.
      Sets the value of a field by name.
      BaseFieldSet setFields​(java.util.Map<java.lang.String,​java.lang.Object> fields)
      Deprecated.
      Sets the value of a number of fields by name.
      java.lang.String toString()
      Deprecated.
       
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • setField

        public BaseFieldSet setField​(java.lang.String key,
                                     java.lang.Object value)
        Deprecated.
        Sets the value of a field by name. It's usually better to use one of the domain-specific setter methods on OrderFieldSet or StrategyFieldSet, but you can call this method if you want to include your own custom fields on an Order or Strategy.
        Parameters:
        key - The name of the field to set the value for.
        value - The field value. This will be converted to a String using Object.toString() unless it is a BigDecimal, in which case it will be converted using BigDecimal.toPlainString()
        Returns:
        A reference to this instance, to allow method chaining.
        Throws:
        java.lang.IllegalArgumentException - If:
        • The key or value is null.
        • The field name is reserved, such as OrderCount.
        • The corresponding key already exists in the "partner map" for the field set. For example, if you set the value of a editable field by calling OrderBuilder.getEditableFields() then an exception will be thrown if you try to set the same field name on the field set returned by calling OrderBuilder.getFixedFields().
      • toString

        public java.lang.String toString()
        Deprecated.
        Overrides:
        toString in class java.lang.Object
      • setFields

        public BaseFieldSet setFields​(java.util.Map<java.lang.String,​java.lang.Object> fields)
        Deprecated.
        Sets the value of a number of fields by name. Calling this method is equivalent to calling setField(String, Object) multiple times.
        Parameters:
        fields - A map of field names and values.
        Returns:
        A reference to this instance, to allow method chaining.