org.compass.core.mapping
Interface MultipleMapping

All Superinterfaces:
Mapping
All Known Subinterfaces:
AliasMapping, InternalResourceMapping, ResourceMapping
All Known Implementing Classes:
AbstractAccessorMultipleMapping, AbstractMultipleMapping, AbstractResourceMapping, ClassBoostPropertyMapping, ClassIdPropertyMapping, ClassMapping, ClassPropertyAnalyzerController, ClassPropertyMapping, ContractMapping, NullResourceMapping, RawResourceMapping, XmlObjectMapping

public interface MultipleMapping
extends Mapping

A mapping type that can hold interlly multiple mappings (associated with a name).

Author:
kimchy

Method Summary
 int addMapping(Mapping mapping)
          Adds the mapping.
 Mapping getMapping(int index)
          Returns the mapping at the given index.
 Mapping getMapping(String name)
          Returns the mapping associated with the given name.
 Iterator mappingsIt()
          Returns an iterator over the stored mappings.
 
Methods inherited from interface org.compass.core.mapping.Mapping
controlsObjectNullability, copy, getConverter, getConverterName, getName, getPath, setConverter, setConverterName, setName, setPath
 

Method Detail

addMapping

int addMapping(Mapping mapping)
Adds the mapping. Returns the location that the mapping was added to.

Parameters:
mapping - The mapping to add
Returns:
The location the mapping was added to.

getMapping

Mapping getMapping(String name)
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.

Parameters:
name - The name tha mapping was registered under when it was added.
Returns:
The mapping found, or null if nothing was found.

getMapping

Mapping getMapping(int index)
Returns the mapping at the given index.


mappingsIt

Iterator mappingsIt()
Returns an iterator over the stored mappings.



Copyright (c) 2004-2008 The Compass Project.