co.uk.hjcs.canyon.accessor
Class ObjectGenerator

java.lang.Object
  extended by co.uk.hjcs.canyon.accessor.ObjectAccessor
      extended by co.uk.hjcs.canyon.accessor.ObjectGenerator

public class ObjectGenerator
extends ObjectAccessor

The ObjectGenerator is responsible for the building of object graphs based on the configured mappings for a particluar session

Author:
HJC Solutions Ltd (http://canyon.hjcsolutions.co.uk)

Constructor Summary
ObjectGenerator(SessionConfig sessionConfig)
           
 
Method Summary
 java.lang.Object create(ClassMapping mapping, FlatFileLine flatFileLine, long sessionId)
          Create an object based on the mapping type from the flatfile line data
 java.lang.Object shallowCreate(ClassMapping mapping, FlatFileLine flatFileLine, long sessionId)
          This method creates an object, but does not populate any non primitive (aprat from String) properties
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectGenerator

public ObjectGenerator(SessionConfig sessionConfig)
Parameters:
sessionConfig -
Method Detail

create

public java.lang.Object create(ClassMapping mapping,
                               FlatFileLine flatFileLine,
                               long sessionId)
                        throws CanyonException
Create an object based on the mapping type from the flatfile line data

Parameters:
mapping -
flatFileLine -
Returns:
the created object
Throws:
CanyonException

shallowCreate

public java.lang.Object shallowCreate(ClassMapping mapping,
                                      FlatFileLine flatFileLine,
                                      long sessionId)
                               throws CanyonException
This method creates an object, but does not populate any non primitive (aprat from String) properties

Parameters:
mapping -
flatFileLine -
Returns:
a shallow object. Object will not have collections or encapsulated objects populated
Throws:
CanyonException