org.milyn.scribe.invoker
Class DaoInvokerFactory
java.lang.Object
org.milyn.scribe.invoker.DaoInvokerFactory
public class DaoInvokerFactory
- extends Object
Manages the creation of DaoInvokers
- Author:
- maurice.zeijen@smies.com
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
REPOSITORY_KEY
public static final String REPOSITORY_KEY
getInstance
public static final DaoInvokerFactory getInstance()
- Returns the DaoInvokerFactory instance
- Returns:
- the DaoInvokerFactory instance
create
public DaoInvoker create(Object dao,
ObjectStore objectStore)
- Creates a DaoInvoker depending on the DAO object.
If the DAO object is a instance of
Dao, MappingDao,
Queryable, Locator or Flushable then a InterfaceDaoInvoker
is created and returned. If the DAO class is annotated with the Dao annotation
then a AnnotatedDaoInvoker is created and returned. If neither is the case then a
IllegalArgumentException exception is thrown.
- Parameters:
dao - The DAO for which the invoker instantiatedobjectStore - An object store for caching and retrieving a cached AnnotatedDaoRuntimeInfoFactory object.
- Returns:
- the DaoInvoker for the specified DAO
- Throws:
IllegalArgumentException - if the DAO object doesn't match for a InterfaceDaoInvoker or AnnotatedDaoInvoker.
Copyright © 2014. All Rights Reserved.