ma.glasnost.orika.impl.generator.specification
Class ObjectToObject

java.lang.Object
  extended by ma.glasnost.orika.impl.generator.specification.AbstractSpecification
      extended by ma.glasnost.orika.impl.generator.specification.ObjectToObject
All Implemented Interfaces:
Specification
Direct Known Subclasses:
ApplyRegisteredMapper

public class ObjectToObject
extends AbstractSpecification


Field Summary
 
Fields inherited from class ma.glasnost.orika.impl.generator.specification.AbstractSpecification
mapperFactory
 
Constructor Summary
ObjectToObject()
           
 
Method Summary
 boolean appliesTo(FieldMap fieldMap)
          Tests whether this Specification applies to the specified MappedTypePair
 String generateEqualityTestCode(VariableRef source, VariableRef destination, Property inverseProperty, SourceCodeContext code)
           
 String generateMappingCode(FieldMap fieldMap, VariableRef source, VariableRef destination, SourceCodeContext code)
          Generates code to map the provided field map
 
Methods inherited from class ma.glasnost.orika.impl.generator.specification.AbstractSpecification
generateEqualityTestCode, setMapperFactory, shouldMapNulls
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectToObject

public ObjectToObject()
Method Detail

appliesTo

public boolean appliesTo(FieldMap fieldMap)
Description copied from interface: Specification
Tests whether this Specification applies to the specified MappedTypePair

Specified by:
appliesTo in interface Specification
Specified by:
appliesTo in class AbstractSpecification
Returns:
true if this specification applies to the given MappedTypePair

generateEqualityTestCode

public String generateEqualityTestCode(VariableRef source,
                                       VariableRef destination,
                                       Property inverseProperty,
                                       SourceCodeContext code)

generateMappingCode

public String generateMappingCode(FieldMap fieldMap,
                                  VariableRef source,
                                  VariableRef destination,
                                  SourceCodeContext code)
Description copied from interface: Specification
Generates code to map the provided field map

Specified by:
generateMappingCode in interface Specification
Specified by:
generateMappingCode in class AbstractSpecification
Parameters:
fieldMap - the fieldMap for which source code should be generated
source - a convenience wrapper around the source field which can be used facilitate code generation
destination - a convenience wrapper around the destination field which can be used facilitate code generation
Returns:
the code snippet which represents mapping from the source to destination property


Copyright © 2013 Glasnost. All Rights Reserved.