org.milyn.scribe.register
Class AbstractDaoAdapterRegister<D,A>

java.lang.Object
  extended by org.milyn.scribe.register.AbstractDaoRegister<D>
      extended by org.milyn.scribe.register.AbstractDaoAdapterRegister<D,A>
All Implemented Interfaces:
DaoRegister<D>

public abstract class AbstractDaoAdapterRegister<D,A>
extends AbstractDaoRegister<D>

An abstract implementation of a DAO adapter TODO: finish documentation

Author:
maurice.zeijen@smies.com

Constructor Summary
AbstractDaoAdapterRegister(A defaultAdaptable)
           
AbstractDaoAdapterRegister(A defaultAdaptable, Map<String,? extends A> adaptableMap)
           
AbstractDaoAdapterRegister(Map<String,? extends A> adaptableMap)
           
 
Method Summary
protected  void addToSessionMap(Map<String,? extends A> adaptableMap)
           
protected abstract  D createAdapter(A adaptable)
          This method creates the Dao Adapter from the Adaptable.
 D getDao(String name)
          Returns the DAO with the specified name.
 D getDefaultDao()
          Returns the default DAO .
 
Methods inherited from class org.milyn.scribe.register.AbstractDaoRegister
returnDao
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDaoAdapterRegister

public AbstractDaoAdapterRegister(A defaultAdaptable)

AbstractDaoAdapterRegister

public AbstractDaoAdapterRegister(A defaultAdaptable,
                                  Map<String,? extends A> adaptableMap)

AbstractDaoAdapterRegister

public AbstractDaoAdapterRegister(Map<String,? extends A> adaptableMap)
Method Detail

addToSessionMap

protected final void addToSessionMap(Map<String,? extends A> adaptableMap)

getDefaultDao

public D getDefaultDao()
Description copied from interface: DaoRegister
Returns the default DAO .

Specified by:
getDefaultDao in interface DaoRegister<D>
Overrides:
getDefaultDao in class AbstractDaoRegister<D>
Returns:
the default DAO

getDao

public D getDao(String name)
Description copied from interface: DaoRegister
Returns the DAO with the specified name.

Specified by:
getDao in interface DaoRegister<D>
Overrides:
getDao in class AbstractDaoRegister<D>
Parameters:
name - the name of the DAO
Returns:
the DAO with the specified name

createAdapter

protected abstract D createAdapter(A adaptable)
This method creates the Dao Adapter from the Adaptable.

NOTE
This method can not reference any object fields because this method is called in the constructor of the AbstractDaoAdapterRegister class.

Parameters:
adaptable - The object that will be adapted by a Dao Adapter
Returns:


Copyright © 2018. All rights reserved.