Class TransformBody

java.lang.Object
com.broadleafcommerce.metadata.dsl.core.TransformBody
All Implemented Interfaces:
Copyable<TransformBody>, Serializable

public class TransformBody extends Object implements Serializable, Copyable<TransformBody>
Represents the transformation of the request or response data for an API request.
Author:
Nick Crum (ncrum)
See Also:
  • Constructor Details

    • TransformBody

      public TransformBody()
    • TransformBody

      public TransformBody(TransformBody transformBody)
  • Method Details

    • copy

      public TransformBody copy()
      Specified by:
      copy in interface Copyable<TransformBody>
      Returns:
      a deep copy of this instance
    • mappings

      public TransformBody mappings(List<Mapping<?>> mappings)
      Adds to the set of mappings to transform the collection.
      Parameters:
      mappings - the collection mappings
      Returns:
      the mapping
    • mapping

      public TransformBody mapping(Mapping<?>... mappings)
      Adds to the set of mappings to transform the collection.
      Parameters:
      mappings - the collection mappings
      Returns:
      the mapping
    • clearMappings

      public TransformBody clearMappings()
      Clears the current set of collection mappings.
      Returns:
      the mapping
    • pick

      public TransformBody pick(List<String> pick)
      Sets the set of fields to include.
      Parameters:
      pick - the picked fields
      Returns:
      the mapping
    • pick

      public TransformBody pick(String... pick)
      Sets the set of fields to include.
      Parameters:
      pick - the picked fields
      Returns:
      the mapping
    • clearPick

      public TransformBody clearPick()
      Clears the set of picked fields.
      Returns:
      the mapping
    • omit

      public TransformBody omit(List<String> omit)
      Sets the set of fields to exclude.
      Parameters:
      omit - the omitted fields
      Returns:
      the mapping
    • omit

      public TransformBody omit(String... omit)
      Sets the set of fields to exclude.
      Parameters:
      omit - the omitted fields
      Returns:
      the mapping
    • clearOmit

      public TransformBody clearOmit()
      Clears the set of omitted fields.
      Returns:
      the mapping
    • self

      protected TransformBody self()
    • getMappings

      public List<Mapping<?>> getMappings()
      Set of mappings to transform the data.
    • getPick

      public List<String> getPick()
      The names of the properties that should be kept from the data.
    • getOmit

      public List<String> getOmit()
      The names of the properties that should be excluded from the data.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object