Package lumis.portal.clock
Class ClockDaoJdbc
- java.lang.Object
-
- lumis.portal.clock.ClockDaoJdbc
-
-
Constructor Summary
Constructors Constructor Description ClockDaoJdbc()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(ClockConfig clockConfig, ITransaction transaction)
Add the clock.void
addOrUpdate(ClockConfig clockConfig, ITransaction transaction)
Add or update the clock.void
delete(String clockId, ITransaction transaction)
Delete the clock.List<ClockConfig>
findRunningClocks(ITransaction transaction)
Get the running clocks.ClockConfig
get(String clockId, ITransaction transaction)
Get the configuration of the clock.List<String>
getClockIds(ITransaction transaction)
Get a list of ids of the clock.Collection<String>
getClockIdsByServiceId(String serviceId, ITransaction transaction)
Get a list of ids by passing the id of the service.Collection<ClockConfig>
getDisabledClocks(ITransaction transaction)
Get disabled clocksList<String>
getNextSchedules(ITransaction transaction)
Get next schedules.boolean
setClockRunning(String clockId, boolean runningState, int maxRunTime, ITransaction transaction)
Set the running of the clock.protected void
setConfigData(ClockConfig loadedConfig, ResultSet resultSet)
boolean
update(ClockConfig clockConfig, ITransaction transaction)
Update the clock.
-
-
-
Method Detail
-
getClockIds
public List<String> getClockIds(ITransaction transaction) throws DaoException, PortalException
Description copied from interface:IClockDao
Get a list of ids of the clock.- Specified by:
getClockIds
in interfaceIClockDao
- Returns:
- an array of Strings.
- Throws:
DaoException
PortalException
-
findRunningClocks
public List<ClockConfig> findRunningClocks(ITransaction transaction) throws DaoException, PortalException
Description copied from interface:IClockDao
Get the running clocks.- Specified by:
findRunningClocks
in interfaceIClockDao
- Parameters:
transaction
- the current transaction.- Returns:
- a list of ClockConfig.
- Throws:
DaoException
PortalException
-
getNextSchedules
public List<String> getNextSchedules(ITransaction transaction) throws DaoException, PortalException
Description copied from interface:IClockDao
Get next schedules.- Specified by:
getNextSchedules
in interfaceIClockDao
- Returns:
- an array of Strings.
- Throws:
DaoException
PortalException
-
getClockIdsByServiceId
public Collection<String> getClockIdsByServiceId(String serviceId, ITransaction transaction) throws DaoException, PortalException
Description copied from interface:IClockDao
Get a list of ids by passing the id of the service.- Specified by:
getClockIdsByServiceId
in interfaceIClockDao
- Returns:
- an array of Strings.
- Throws:
DaoException
PortalException
-
get
public ClockConfig get(String clockId, ITransaction transaction) throws DaoException, PortalException
Description copied from interface:IClockDao
Get the configuration of the clock.- Specified by:
get
in interfaceIClockDao
- Returns:
- a ClockConfig.
- Throws:
DaoException
PortalException
-
setConfigData
protected void setConfigData(ClockConfig loadedConfig, ResultSet resultSet) throws SQLException
- Throws:
SQLException
-
add
public void add(ClockConfig clockConfig, ITransaction transaction) throws DaoException, PortalException
Description copied from interface:IClockDao
Add the clock.- Specified by:
add
in interfaceIClockDao
- Throws:
DaoException
PortalException
-
update
public boolean update(ClockConfig clockConfig, ITransaction transaction) throws DaoException, PortalException
Description copied from interface:IClockDao
Update the clock.- Specified by:
update
in interfaceIClockDao
- Returns:
- Throws:
DaoException
PortalException
-
addOrUpdate
public void addOrUpdate(ClockConfig clockConfig, ITransaction transaction) throws DaoException, PortalException
Description copied from interface:IClockDao
Add or update the clock. This method add the clock if it don't exist.- Specified by:
addOrUpdate
in interfaceIClockDao
- Throws:
DaoException
PortalException
-
delete
public void delete(String clockId, ITransaction transaction) throws DaoException, PortalException
Description copied from interface:IClockDao
Delete the clock.- Specified by:
delete
in interfaceIClockDao
- Throws:
DaoException
PortalException
-
setClockRunning
public boolean setClockRunning(String clockId, boolean runningState, int maxRunTime, ITransaction transaction) throws PortalException
Description copied from interface:IClockDao
Set the running of the clock.- Specified by:
setClockRunning
in interfaceIClockDao
- Returns:
- Throws:
DaoException
PortalException
-
getDisabledClocks
public Collection<ClockConfig> getDisabledClocks(ITransaction transaction) throws PortalException
Description copied from interface:IClockDao
Get disabled clocks- Specified by:
getDisabledClocks
in interfaceIClockDao
- Returns:
- Throws:
DaoException
PortalException
-
-