lumis.portal.clock
Class ClockDaoJdbc

Package class diagram package ClockDaoJdbc
java.lang.Object
  extended by lumis.portal.clock.ClockDaoJdbc
All Implemented Interfaces:
IClockDao

public class ClockDaoJdbc
extends Object
implements IClockDao

Group DAO jdbc-based implementation.

Since:
4.0.11

Constructor Summary
ClockDaoJdbc()
           
 
Method Summary
 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.
 List<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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClockDaoJdbc

public ClockDaoJdbc()
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 interface IClockDao
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 interface IClockDao
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 interface IClockDao
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 interface IClockDao
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 interface IClockDao
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 interface IClockDao
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 interface IClockDao
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 interface IClockDao
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 interface IClockDao
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 interface IClockDao
Returns:
Throws:
DaoException
PortalException


Lumisportal  6.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.