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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TransformBody()TransformBody(TransformBody transformBody)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(Object other)TransformBodyclearMappings()Clears the current set of collection mappings.TransformBodyclearOmit()Clears the set of omitted fields.TransformBodyclearPick()Clears the set of picked fields.TransformBodycopy()booleanequals(Object o)List<Mapping<?>>getMappings()Set of mappings to transform the data.List<String>getOmit()The names of the properties that should be excluded from the data.List<String>getPick()The names of the properties that should be kept from the data.inthashCode()TransformBodymapping(Mapping<?>... mappings)Adds to the set of mappings to transform the collection.TransformBodymappings(List<Mapping<?>> mappings)Adds to the set of mappings to transform the collection.TransformBodyomit(String... omit)Sets the set of fields to exclude.TransformBodyomit(List<String> omit)Sets the set of fields to exclude.TransformBodypick(String... pick)Sets the set of fields to include.TransformBodypick(List<String> pick)Sets the set of fields to include.protected TransformBodyself()
-
-
-
Constructor Detail
-
TransformBody
public TransformBody()
-
TransformBody
public TransformBody(TransformBody transformBody)
-
-
Method Detail
-
copy
public TransformBody copy()
- Specified by:
copyin interfaceCopyable<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()
-
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.
-
canEqual
protected boolean canEqual(Object other)
-
-