org.compass.core.mapping.support
Class AbstractMultipleMapping
java.lang.Object
org.compass.core.mapping.support.AbstractMapping
org.compass.core.mapping.support.AbstractMultipleMapping
- All Implemented Interfaces:
- InternalMapping, InternalMultipleMapping, Mapping, MultipleMapping
- Direct Known Subclasses:
- AbstractAccessorMultipleMapping, AbstractResourceMapping, DefaultContractMapping, PlainJsonObjectMapping
public abstract class AbstractMultipleMapping
- extends AbstractMapping
- implements InternalMultipleMapping
A base class implementation of InternalMultipleMapping.
- Author:
- kimchy
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mappings
protected ArrayList<Mapping> mappings
mappingsByNameMap
protected Map<String,Mapping> mappingsByNameMap
AbstractMultipleMapping
public AbstractMultipleMapping()
removeExistingByName
public void removeExistingByName(Mapping mapping)
addMapping
public int addMapping(Mapping mapping)
- Description copied from interface:
InternalMultipleMapping
- Adds the mapping. Returns the location that the mapping was added to.
- Specified by:
addMapping in interface InternalMultipleMapping
- Parameters:
mapping - The mapping to add
- Returns:
- The location the mapping was added to.
addMappings
public void addMappings(MultipleMapping mapping)
replaceMappings
public void replaceMappings(MultipleMapping mapping)
mappingsIt
public Iterator<Mapping> mappingsIt()
- Description copied from interface:
MultipleMapping
- Returns an iterator over the stored mappings.
- Specified by:
mappingsIt in interface MultipleMapping
mappingsSize
public int mappingsSize()
getMapping
public Mapping getMapping(String name)
- Description copied from interface:
MultipleMapping
- Returns the mapping associated with the given name. Don't be confused with
Mapping.getName(), since the mappings might be saved not under the mapping
name (it might be under the mapping path). It really depends on the actual
implementation.
- Specified by:
getMapping in interface MultipleMapping
- Parameters:
name - The name tha mapping was registered under when it was added.
- Returns:
- The mapping found, or
null if nothing was found.
getMapping
public Mapping getMapping(int index)
- Description copied from interface:
MultipleMapping
- Returns the mapping at the given index.
- Specified by:
getMapping in interface MultipleMapping
clearMappings
public void clearMappings()
copy
protected void copy(InternalMultipleMapping mapping)
shallowCopy
protected void shallowCopy(InternalMultipleMapping mapping)
Copyright (c) 2004-2008 The Compass Project.