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
public class CollectionMapping extends Mapping<CollectionMapping> implements Serializable
An implementation ofMappingfor the members of a collection.- Author:
- Nick Crum (ncrum)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CollectionMapping()CollectionMapping(CollectionMapping mapping)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(Object other)CollectionMappingclearMappings()Clears the current set of collection mappings.CollectionMappingcopy()booleanequals(Object o)List<Mapping<?>>getMappings()The list ofMappingto apply to each collection member.StringgetPath()The name of the collection property to map.inthashCode()CollectionMappingmapCollection(String path, Mapping<?>... mappings)Sets the collection property and the set of mappings for the collection.CollectionMappingmapCollection(String path, List<Mapping<?>> mappings)Sets the collection property and the set of mappings for the collection.CollectionMappingmapping(Mapping<?>... mappings)Adds to the set of mappings to transform the collection.CollectionMappingmappings(List<Mapping<?>> mappings)Adds to the set of mappings to transform the collection.CollectionMappingpath(String path)Sets the collection property to be mapped.
-
-
-
Constructor Detail
-
CollectionMapping
public CollectionMapping()
-
CollectionMapping
public CollectionMapping(CollectionMapping mapping)
-
-
Method Detail
-
copy
public CollectionMapping copy()
- Specified by:
copyin interfaceCopyable<CollectionMapping>- Returns:
- a deep copy of this instance
-
path
public CollectionMapping path(String path)
Sets the collection property to be mapped.- Parameters:
path- the collection property- Returns:
- the mapping
-
mappings
public CollectionMapping mappings(List<Mapping<?>> mappings)
Adds to the set of mappings to transform the collection.- Parameters:
mappings- the collection mappings- Returns:
- the mapping
-
mapping
public CollectionMapping mapping(Mapping<?>... mappings)
Adds to the set of mappings to transform the collection.- Parameters:
mappings- the collection mappings- Returns:
- the mapping
-
clearMappings
public CollectionMapping clearMappings()
Clears the current set of collection mappings.- Returns:
- the mapping
-
mapCollection
public CollectionMapping mapCollection(String path, List<Mapping<?>> mappings)
Sets the collection property and the set of mappings for the collection.- Parameters:
path- the pathmappings- the set of mappings- Returns:
- the mapping
-
mapCollection
public CollectionMapping mapCollection(String path, Mapping<?>... mappings)
Sets the collection property and the set of mappings for the collection.- Parameters:
path- the pathmappings- the set of mappings- Returns:
- the mapping
-
getPath
public String getPath()
The name of the collection property to map.
-
getMappings
public List<Mapping<?>> getMappings()
The list ofMappingto apply to each collection member.
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classMapping<CollectionMapping>
-
canEqual
protected boolean canEqual(Object other)
- Overrides:
canEqualin classMapping<CollectionMapping>
-
hashCode
public int hashCode()
- Overrides:
hashCodein classMapping<CollectionMapping>
-
-