org.compass.core.converter.mapping.osem
Class AbstractRefAliasMappingConverter

java.lang.Object
  extended by org.compass.core.converter.mapping.osem.AbstractRefAliasMappingConverter
All Implemented Interfaces:
Converter
Direct Known Subclasses:
ComponentMappingConverter, ReferenceMappingConverter

public abstract class AbstractRefAliasMappingConverter
extends Object
implements Converter

Author:
kimchy

Constructor Summary
AbstractRefAliasMappingConverter()
           
 
Method Summary
protected abstract  boolean doMarshall(Resource resource, Object root, HasRefAliasMapping hasRefAliasMapping, ClassMapping refMapping, MarshallingContext context)
           
protected abstract  Object doUnmarshall(Resource resource, HasRefAliasMapping hasRefAliasMapping, ClassMapping refMapping, MarshallingContext context)
           
 boolean marshall(Resource resource, Object root, Mapping mapping, MarshallingContext context)
          Marshall the given Object to the given Resource.
protected  boolean rollbackClassNameOnPoly()
           
 Object unmarshall(Resource resource, Mapping mapping, MarshallingContext context)
          Unmarshall the given Resource to the appropiate Object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractRefAliasMappingConverter

public AbstractRefAliasMappingConverter()
Method Detail

marshall

public boolean marshall(Resource resource,
                        Object root,
                        Mapping mapping,
                        MarshallingContext context)
                 throws ConversionException
Description copied from interface: Converter
Marshall the given Object to the given Resource. Will use the mapping definition as to how to marshall the object.

Returns true if data was saved in the index, and it can be read as well (i.e. stored).

Specified by:
marshall in interface Converter
Parameters:
resource - The resource to marhsall the object to
root - The Object to marshall to the resource
mapping - The mapping definition of how to marshall the Object to the resoruce
context - The context for the current marhslling process
Returns:
true if data was saved in the the index that can be read.
Throws:
ConversionException

doMarshall

protected abstract boolean doMarshall(Resource resource,
                                      Object root,
                                      HasRefAliasMapping hasRefAliasMapping,
                                      ClassMapping refMapping,
                                      MarshallingContext context)
                               throws ConversionException
Throws:
ConversionException

unmarshall

public Object unmarshall(Resource resource,
                         Mapping mapping,
                         MarshallingContext context)
                  throws ConversionException
Description copied from interface: Converter
Unmarshall the given Resource to the appropiate Object.

Specified by:
unmarshall in interface Converter
Parameters:
resource - The resource to unmarshall into an Object
mapping - The mapping definition of how to unmarshall the Resource into an Object
context - The context for the current marshalling process
Returns:
The object unmarshalled
Throws:
ConversionException

doUnmarshall

protected abstract Object doUnmarshall(Resource resource,
                                       HasRefAliasMapping hasRefAliasMapping,
                                       ClassMapping refMapping,
                                       MarshallingContext context)
                                throws ConversionException
Throws:
ConversionException

rollbackClassNameOnPoly

protected boolean rollbackClassNameOnPoly()


Copyright (c) 2004-2008 The Compass Project.