public class MultiDaoRegister<T> extends AbstractDaoRegister<T>
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.
Modifier and Type | Method and Description |
---|---|
static <T> org.milyn.scribe.register.MultiDaoRegister.Builder<T> |
builder()
Creates a Builder object that can build a
MultiDaoRegister |
static <T> org.milyn.scribe.register.MultiDaoRegister.Builder<T> |
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 <T> MultiDaoRegister<T> |
newInstance(Map<String,? extends DaoRegister<T>> map)
Creates a new
MultiDaoRegister and fills it with the provided map. |
int |
size() |
String |
toString() |
getDefaultDao, returnDao
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
MultiDaoRegister
public static <T> org.milyn.scribe.register.MultiDaoRegister.Builder<T> builder()
MultiDaoRegister
T
- The type of the DAOpublic 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 builderpublic T getDao(String name)
DaoRegister
getDao
in interface DaoRegister<T>
getDao
in class AbstractDaoRegister<T>
name
- the name of the DAOpublic int size()
public Map<String,DaoRegister<T>> getDaoRegisterMap()
Copyright © 2020. All rights reserved.