|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.milyn.scribe.register.AbstractDaoRegister<T>
org.milyn.scribe.register.MultiDaoRegister<T>
public class MultiDaoRegister<T>
Enables multiple DaoRegister objects to be used as one DaoRegister.
Each DaoRegister gets a name. To get the correct DAO the following name notation
is used "{DaoRegister name}.{Dao name}".
A MultiDaoRegister can be created via the static newInstance(Map) method
or via the Builder object. The Builder object can be created via it's constructor
or the static builder() or builder(Map) methods.
| Method Summary | ||
|---|---|---|
static
|
builder()
Creates a Builder object that can build a MultiDaoRegister |
|
static
|
builder(Map<String,? extends DaoRegister<T>> map)
Creates a Builder object that can build a MultiDaoRegister. |
|
boolean |
equals(Object obj)
|
|
T |
getDao(String name)
Returns the DAO with the specified name. |
|
Map<String,DaoRegister<T>> |
getDaoRegisterMap()
|
|
int |
hashCode()
|
|
static
|
newInstance(Map<String,? extends DaoRegister<T>> map)
Creates a new MultiDaoRegister and fills it with the provided map. |
|
int |
size()
|
|
String |
toString()
|
|
| Methods inherited from class org.milyn.scribe.register.AbstractDaoRegister |
|---|
getDefaultDao, returnDao |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static <T> MultiDaoRegister<T> newInstance(Map<String,? extends DaoRegister<T>> map)
MultiDaoRegister and fills it with the provided map.
T - the type of the DAOmap - the map that fills the new MultiDaoRegister
MultiDaoRegisterpublic static <T> org.milyn.scribe.register.MultiDaoRegister.Builder<T> builder()
MultiDaoRegister
T - The type of the DAO
public static <T> org.milyn.scribe.register.MultiDaoRegister.Builder<T> builder(Map<String,? extends DaoRegister<T>> map)
MultiDaoRegister.
The builder will be instantiated with the provided map.
T - The type of the DAOmap - The map that is added to the builder
public T getDao(String name)
DaoRegister
getDao in interface DaoRegister<T>getDao in class AbstractDaoRegister<T>name - the name of the DAO
public int size()
public Map<String,DaoRegister<T>> getDaoRegisterMap()
public int hashCode()
hashCode in class Objectpublic String toString()
toString in class Objectpublic boolean equals(Object obj)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||