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 of Mapping for the members of a collection.
Author:
Nick Crum (ncrum)
See Also:
  • Constructor Details

    • CollectionMapping

      public CollectionMapping()
    • CollectionMapping

      public CollectionMapping(CollectionMapping mapping)
  • Method Details

    • copy

      public CollectionMapping copy()
      Specified by:
      copy in interface Copyable<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 path
      mappings - 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 path
      mappings - 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 of Mapping to apply to each collection member.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Mapping<CollectionMapping>
    • canEqual

      protected boolean canEqual(Object other)
      Overrides:
      canEqual in class Mapping<CollectionMapping>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Mapping<CollectionMapping>