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 boolean
canEqual(Object other)
TransformBody
clearMappings()
Clears the current set of collection mappings.TransformBody
clearOmit()
Clears the set of omitted fields.TransformBody
clearPick()
Clears the set of picked fields.TransformBody
copy()
boolean
equals(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.int
hashCode()
TransformBody
mapping(Mapping<?>... mappings)
Adds to the set of mappings to transform the collection.TransformBody
mappings(List<Mapping<?>> mappings)
Adds to the set of mappings to transform the collection.TransformBody
omit(String... omit)
Sets the set of fields to exclude.TransformBody
omit(List<String> omit)
Sets the set of fields to exclude.TransformBody
pick(String... pick)
Sets the set of fields to include.TransformBody
pick(List<String> pick)
Sets the set of fields to include.protected TransformBody
self()
-
-
-
Constructor Detail
-
TransformBody
public TransformBody()
-
TransformBody
public TransformBody(TransformBody transformBody)
-
-
Method Detail
-
copy
public TransformBody copy()
- Specified by:
copy
in 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)
-
-