org.compass.core.config.process
Class CollectionMappingProcessor

java.lang.Object
  extended by org.compass.core.config.process.CollectionMappingProcessor
All Implemented Interfaces:
MappingProcessor

public class CollectionMappingProcessor
extends Object
implements MappingProcessor

Goes over all the OSEM ClassMappings. For each class mappings, goes over all of its mappings and checks if they represent a collection/array. If they represent a collection/array, wraps them with either a CollectionMapping or an ArrayMapping. Copies over the mappings types and set it as the collection/array element mapping.

A note on element mapping: Compass simplifies mappings for collection. There is no need for different property/component/reference mappings when handling collections/arrays. So, the actual mappings (property/ component/reference) actually refers to the element mapping, which is why the mapping constructed is copied over as the element mapping.

Author:
kimchy

Constructor Summary
CollectionMappingProcessor()
           
 
Method Summary
 CompassMapping process(CompassMapping compassMapping, PropertyNamingStrategy namingStrategy, ConverterLookup converterLookup, CompassSettings settings)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionMappingProcessor

public CollectionMappingProcessor()
Method Detail

process

public CompassMapping process(CompassMapping compassMapping,
                              PropertyNamingStrategy namingStrategy,
                              ConverterLookup converterLookup,
                              CompassSettings settings)
                       throws MappingException
Specified by:
process in interface MappingProcessor
Throws:
MappingException


Copyright (c) 2004-2009 The Compass Project.