Class MeasurementsDaoRegistryImpl
- java.lang.Object
-
- org.palladiosimulator.edp2.dao.impl.MeasurementsDaoRegistryImpl
-
- All Implemented Interfaces:
MeasurementsDaoRegistry
public class MeasurementsDaoRegistryImpl extends Object implements MeasurementsDaoRegistry
Default implementation of the DaoRegistry. Responsible to hold a list of all registered DAOs and the access to them. The DAO factories should be used for creation of DAOs. They must register the DAOs at the central registry.
-
-
Constructor Summary
Constructors Constructor Description MeasurementsDaoRegistryImpl()
Initialize the registry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deregister(String uuid)
Deregisters an registered DAO.MeasurementsDao<?,?>
getMeasurementsDao(String uuid)
Returns a registered DAO.Set<String>
getRegisteredUuids()
Returns the registered UUIDs.boolean
isRegistered(String uuid)
Checks if a DAO is registered for the UUID.void
register(MeasurementsDao<?,?> dao, String uuid)
Registers a new DAO.
-
-
-
Method Detail
-
deregister
public void deregister(String uuid)
Description copied from interface:MeasurementsDaoRegistry
Deregisters an registered DAO.- Specified by:
deregister
in interfaceMeasurementsDaoRegistry
- Parameters:
uuid
- The UUID of the registered DAO.
-
isRegistered
public boolean isRegistered(String uuid)
Description copied from interface:MeasurementsDaoRegistry
Checks if a DAO is registered for the UUID.- Specified by:
isRegistered
in interfaceMeasurementsDaoRegistry
- Parameters:
uuid
- The UUID of the DAO.- Returns:
true
if there is a DAO registered.
-
register
public void register(MeasurementsDao<?,?> dao, String uuid)
Description copied from interface:MeasurementsDaoRegistry
Registers a new DAO.- Specified by:
register
in interfaceMeasurementsDaoRegistry
- Parameters:
dao
- The DAO to register.uuid
- The UUID for which the DAO is responsible.
-
getMeasurementsDao
public MeasurementsDao<?,?> getMeasurementsDao(String uuid)
Description copied from interface:MeasurementsDaoRegistry
Returns a registered DAO.- Specified by:
getMeasurementsDao
in interfaceMeasurementsDaoRegistry
- Parameters:
uuid
- The UUID of the DAO.- Returns:
- The DAO.
-
getRegisteredUuids
public Set<String> getRegisteredUuids()
Description copied from interface:MeasurementsDaoRegistry
Returns the registered UUIDs.- Specified by:
getRegisteredUuids
in interfaceMeasurementsDaoRegistry
- Returns:
- List with all registered UUIDs.
-
-