Class CollectionMapping
java.lang.Object
com.broadleafcommerce.metadata.dsl.core.Mapping<CollectionMapping>
com.broadleafcommerce.metadata.dsl.core.extension.mappings.CollectionMapping
- All Implemented Interfaces:
Copyable<CollectionMapping>
,Serializable
An implementation of
Mapping
for the members of a collection.- Author:
- Nick Crum (ncrum)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
Clears the current set of collection mappings.copy()
boolean
The list ofMapping
to apply to each collection member.getPath()
The name of the collection property to map.int
hashCode()
mapCollection
(String path, Mapping<?>... mappings) Sets the collection property and the set of mappings for the collection.mapCollection
(String path, List<Mapping<?>> mappings) Sets the collection property and the set of mappings for the collection.Adds to the set of mappings to transform the collection.Adds to the set of mappings to transform the collection.Sets the collection property to be mapped.
-
Constructor Details
-
CollectionMapping
public CollectionMapping() -
CollectionMapping
-
-
Method Details
-
copy
- Specified by:
copy
in interfaceCopyable<CollectionMapping>
- Returns:
- a deep copy of this instance
-
path
Sets the collection property to be mapped.- Parameters:
path
- the collection property- Returns:
- the mapping
-
mappings
Adds to the set of mappings to transform the collection.- Parameters:
mappings
- the collection mappings- Returns:
- the mapping
-
mapping
Adds to the set of mappings to transform the collection.- Parameters:
mappings
- the collection mappings- Returns:
- the mapping
-
clearMappings
Clears the current set of collection mappings.- Returns:
- the mapping
-
mapCollection
Sets the collection property and the set of mappings for the collection.- Parameters:
path
- the pathmappings
- the set of mappings- Returns:
- the mapping
-
mapCollection
Sets the collection property and the set of mappings for the collection.- Parameters:
path
- the pathmappings
- the set of mappings- Returns:
- the mapping
-
getPath
The name of the collection property to map. -
getMappings
The list ofMapping
to apply to each collection member. -
equals
- Overrides:
equals
in classMapping<CollectionMapping>
-
canEqual
- Overrides:
canEqual
in classMapping<CollectionMapping>
-
hashCode
public int hashCode()- Overrides:
hashCode
in classMapping<CollectionMapping>
-