net.sf.doolin.util.factory
Class InitialisingDataFactory<T>

java.lang.Object
  extended by net.sf.doolin.util.factory.InitialisingDataFactory<T>
Type Parameters:
T - Type of object to create
All Implemented Interfaces:
DataFactory<T>

public class InitialisingDataFactory<T>
extends Object
implements DataFactory<T>

Calls another data factory and initialises some of its properties.

Author:
Damien Coraboeuf

Constructor Summary
InitialisingDataFactory()
           
 
Method Summary
 T create(Object context)
          Creates an arbitrary object.
 DataFactory<T> getDataFactory()
          Gets the factory to call first.
 Map<String,Object> getInitialisationMap()
          Gets the property paths and their values
 void setDataFactory(DataFactory<T> dataFactory)
          Sets the factory to call first.
 void setInitialisationMap(Map<String,Object> initialisationMap)
          Sets the property paths and their values
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InitialisingDataFactory

public InitialisingDataFactory()
Method Detail

create

public T create(Object context)
Description copied from interface: DataFactory
Creates an arbitrary object.

Specified by:
create in interface DataFactory<T>
Parameters:
context - Context of creation
Returns:
Created object.

getDataFactory

public DataFactory<T> getDataFactory()
Gets the factory to call first.

Returns:
Data factory

getInitialisationMap

public Map<String,Object> getInitialisationMap()
Gets the property paths and their values

Returns:
Map of property paths/values

setDataFactory

public void setDataFactory(DataFactory<T> dataFactory)
Sets the factory to call first.

Parameters:
dataFactory - Data factory

setInitialisationMap

public void setInitialisationMap(Map<String,Object> initialisationMap)
Sets the property paths and their values

Parameters:
initialisationMap - Map of property paths/values


Copyright © 2011. All Rights Reserved.