org.jtheque.core.managers.persistence.able
Class DataContainerProvider

java.lang.Object
  extended by org.jtheque.core.managers.persistence.able.DataContainerProvider

public final class DataContainerProvider
extends java.lang.Object

A provider for dao. This class give acces to all daos or to specific dao with differents parameters of search.

Author:
Baptiste Wicht

Method Summary
 void addContainer(DataContainer<? extends Entity> container)
          Add a container to manage.
 java.lang.Iterable<DataContainer<? extends Entity>> getAllContainers()
          Return all the DAOs.
 DataContainer<? extends Entity> getContainerForDataType(java.lang.String dataType)
          Return the DAO for a specific datatype.
 java.util.List<? extends Entity> getDatas(java.lang.String dataType)
          Return the datas of a specific datatype.
static DataContainerProvider getInstance()
          Return the unique instance of the DaoProvider.
 void removeContainer(DataContainer<? extends Entity> container)
          Remove a container.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addContainer

public void addContainer(DataContainer<? extends Entity> container)
Add a container to manage.

Parameters:
container - The container to add.

removeContainer

public void removeContainer(DataContainer<? extends Entity> container)
Remove a container.

Parameters:
container - The container to remove.

getInstance

public static DataContainerProvider getInstance()
Return the unique instance of the DaoProvider.

Returns:
The unique instance of the class.

getAllContainers

public java.lang.Iterable<DataContainer<? extends Entity>> getAllContainers()
Return all the DAOs.

Returns:
A List containing all the DAO.

getContainerForDataType

public DataContainer<? extends Entity> getContainerForDataType(java.lang.String dataType)
Return the DAO for a specific datatype.

Parameters:
dataType - The data type for which we want the DAO.
Returns:
The dao or null if we don't find one.

getDatas

public java.util.List<? extends Entity> getDatas(java.lang.String dataType)
Return the datas of a specific datatype.

Parameters:
dataType - The type of data we search.
Returns:
A List containing all the datas we search.


Copyright © 2009 JTheque. All Rights Reserved.