it.avutils.jmapper.operations.complex
Class AComplexOperation

java.lang.Object
  extended by it.avutils.jmapper.operations.AGeneralOperationAccessor
      extended by it.avutils.jmapper.operations.AGeneralOperation
          extended by it.avutils.jmapper.operations.complex.AComplexOperation
Direct Known Subclasses:
ARecursiveOperation, ArrayListOperation, ArrayOperation, CollectionOperation, ListArrayOperation, MapOperation

public abstract class AComplexOperation
extends AGeneralOperation

This class represents an abstract complex operation that adds, to basic mapping, a generic flow.

Author:
Alessandro Vurro

Field Summary
 
Fields inherited from class it.avutils.jmapper.operations.AGeneralOperationAccessor
conversion, conversionMembership, destinationField, info, initialDGetPath, initialDSetPath, initialSGetPath, mtd, mts, sourceField
 
Constructor Summary
AComplexOperation()
           
 
Method Summary
protected abstract  StringBuilder existingField()
           
protected abstract  StringBuilder fieldToCreate()
           
 Class<?> getDestinationClass()
           
protected  Object getSourceConverted()
           
protected  Object getSourceTreated()
           
protected  StringBuilder newInstance(Object instanceName)
           
protected  StringBuilder newInstance(Object instanceName, Object constructorArg)
           
 AComplexOperation setDestinationClass(Class<?> aDestinationClass)
           
protected  StringBuilder sharedCode(StringBuilder content)
           
 StringBuilder write(boolean isNewInstance)
           
 
Methods inherited from class it.avutils.jmapper.operations.AGeneralOperation
addMappingTypeControl, applyExplicitConversion, applyImplicitConversion, getDestination, getSource, setDestination, setDestination, theSourceIsToBeConverted, write, write
 
Methods inherited from class it.avutils.jmapper.operations.AGeneralOperationAccessor
destinationType, getMtd, getMts, initialDGetPath, initialDSetPath, initialSGetPath, setConversionMethod, setDestinationField, setInfoOperation, setMemberShip, setMtd, setMts, setSourceField, sourceType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AComplexOperation

public AComplexOperation()
Method Detail

getSourceConverted

protected Object getSourceConverted()
Returns:
Returns the name of the object shared between existingField and fieldToCreate methods.

existingField

protected abstract StringBuilder existingField()
Returns:
a StringBuilder containing the mapping for an existing field

fieldToCreate

protected abstract StringBuilder fieldToCreate()
Returns:
a StringBuilder containing the mapping for a new instance of the field

sharedCode

protected StringBuilder sharedCode(StringBuilder content)
Returns:
a StringBuilder containing the shared code between fieldToCreate and existingField methods
See Also:
fieldToCreate(), existingField()

getSourceTreated

protected Object getSourceTreated()
Returns:
the name of treated source

write

public final StringBuilder write(boolean isNewInstance)
Parameters:
isNewInstance - true if new instance must be created, false otherwise
Returns:
a StringBuilder containing the mapping operation

newInstance

protected final StringBuilder newInstance(Object instanceName)
Parameters:
instanceName - name of new instance
Returns:
a StringBuilder containing a new Instance of destinationClass with the name given in input

newInstance

protected final StringBuilder newInstance(Object instanceName,
                                          Object constructorArg)
Parameters:
instanceName - name of new instance
constructorArg - argument of the constructor
Returns:
a StringBuilder containing a new Instance of destinationClass with the name given in input

getDestinationClass

public final Class<?> getDestinationClass()

setDestinationClass

public final AComplexOperation setDestinationClass(Class<?> aDestinationClass)


Copyright © 2013. All Rights Reserved.