lumis.portal.serviceinstance
Class ServiceInstanceDaoJdbc

Package class diagram package ServiceInstanceDaoJdbc
java.lang.Object
  extended by lumis.portal.serviceinstance.ServiceInstanceDaoJdbc
All Implemented Interfaces:
IServiceInstanceDao
Direct Known Subclasses:
ServiceInstanceDaoHib

public class ServiceInstanceDaoJdbc
extends Object
implements IServiceInstanceDao

Service instance DAO implementation for JDBC.

Since:
4.0.0

Constructor Summary
ServiceInstanceDaoJdbc()
           
 
Method Summary
 void add(ServiceInstanceConfig serviceInstanceConfig, ITransaction transaction)
          Add the service's instance.
 void addServiceInstanceDependency(ServiceInstanceDependencyConfig serviceInstanceDependencyConfig, ITransaction transaction)
          Add the given service instance dependency to the persistence.
 void delete(String serviceInstanceId, ITransaction transaction)
          Delete the service's instance.
 void deleteCustomProperties(String serviceInstanceId, ITransaction daoTransaction)
          Delete all service instance´s custom properties.
 void deleteCustomProperty(String serviceInstanceId, String name, ITransaction daoTransaction)
          Delete a service instance´s custom property.
 ServiceInstanceConfig get(String serviceInstanceId, ITransaction transaction)
          Get the service's instance.
 List<IChannelChild> getChannelsChildren(String parentChannelIds, boolean hideItems, String serviceId, IResource resource, Locale locale, ITransaction transaction)
           
 List<IChannelChild> getChildrenData(String channelId, int hidePages, String serviceId, IResource resource, Locale locale, ITransaction transaction)
           
 HashMap<String,String> getCustomProperties(String serviceInstanceId, ITransaction daoTransaction)
          Get all service instance's custom properties.
 String getCustomProperty(String serviceInstanceId, String name, ITransaction daoTransaction)
          Get service instance´s custom property.
 Collection<String> getDependencyIdsByServiceInstanceId(String serviceInstanceId, ITransaction transaction)
          Get the ids of all the service instances that the given service instance depends on
 Collection<String> getIdsByChannelIdAndServiceId(String channelId, String serviceId, ITransaction transaction)
          Get a list of ids in a given channel and of a given service.
 Collection<String> getIdsByServiceInstanceAndDependencyType(String serviceInstanceId, String dependencyType, ITransaction transaction)
          Get the ids of the service instances that the given service instance depends on by the given dependency type.
 Collection<String> getIdsOfDependentServiceInstances(String serviceInstanceId, ITransaction transaction)
          Get the ids of all service instances that depends on the given service instance.
 ServiceInstanceDependencyConfig getServiceInstanceDependency(String dependencyId, ITransaction transaction)
          Get a ServiceInstanceDependencyConfig by the dependencyId.
 void removeServiceInstanceDependencies(String dependentServiceInstanceId, String dependencyType, ITransaction transaction)
          Remove the service instance dependencies that matches the dependent service instance id and dependency type given.
 void setCustomProperty(String serviceInstanceId, String name, String value, ITransaction daoTransaction)
          Set service instance´s custom property.
 void update(ServiceInstanceConfig serviceInstanceConfig, ITransaction transaction)
          Update the service's instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceInstanceDaoJdbc

public ServiceInstanceDaoJdbc()
Method Detail

get

public ServiceInstanceConfig get(String serviceInstanceId,
                                 ITransaction transaction)
                          throws DaoException,
                                 PortalException
Description copied from interface: IServiceInstanceDao
Get the service's instance.

Specified by:
get in interface IServiceInstanceDao
Returns:
Throws:
DaoException
PortalException

add

public void add(ServiceInstanceConfig serviceInstanceConfig,
                ITransaction transaction)
         throws DaoException,
                PortalException
Description copied from interface: IServiceInstanceDao
Add the service's instance.

Specified by:
add in interface IServiceInstanceDao
Throws:
DaoException
PortalException

update

public void update(ServiceInstanceConfig serviceInstanceConfig,
                   ITransaction transaction)
            throws DaoException,
                   PortalException
Description copied from interface: IServiceInstanceDao
Update the service's instance.

Specified by:
update in interface IServiceInstanceDao
Throws:
DaoException
PortalException

delete

public void delete(String serviceInstanceId,
                   ITransaction transaction)
            throws DaoException,
                   PortalException
Description copied from interface: IServiceInstanceDao
Delete the service's instance.

Specified by:
delete in interface IServiceInstanceDao
Throws:
DaoException
PortalException

getIdsByChannelIdAndServiceId

public Collection<String> getIdsByChannelIdAndServiceId(String channelId,
                                                        String serviceId,
                                                        ITransaction transaction)
                                                 throws DaoException,
                                                        PortalException
Description copied from interface: IServiceInstanceDao
Get a list of ids in a given channel and of a given service. The channel or the service may be ommitted. In this case only the other condition will select the returned ids.

Specified by:
getIdsByChannelIdAndServiceId in interface IServiceInstanceDao
Returns:
Throws:
DaoException
PortalException

getCustomProperty

public String getCustomProperty(String serviceInstanceId,
                                String name,
                                ITransaction daoTransaction)
                         throws DaoException,
                                PortalException
Description copied from interface: IServiceInstanceDao
Get service instance´s custom property.

Specified by:
getCustomProperty in interface IServiceInstanceDao
Returns:
Throws:
DaoException
PortalException

getCustomProperties

public HashMap<String,String> getCustomProperties(String serviceInstanceId,
                                                  ITransaction daoTransaction)
                                           throws DaoException,
                                                  PortalException
Description copied from interface: IServiceInstanceDao
Get all service instance's custom properties.

Specified by:
getCustomProperties in interface IServiceInstanceDao
Returns:
Throws:
DaoException
PortalException

setCustomProperty

public void setCustomProperty(String serviceInstanceId,
                              String name,
                              String value,
                              ITransaction daoTransaction)
                       throws DaoException,
                              PortalException
Description copied from interface: IServiceInstanceDao
Set service instance´s custom property.

Specified by:
setCustomProperty in interface IServiceInstanceDao
Throws:
DaoException
PortalException

deleteCustomProperties

public void deleteCustomProperties(String serviceInstanceId,
                                   ITransaction daoTransaction)
                            throws DaoException,
                                   PortalException
Description copied from interface: IServiceInstanceDao
Delete all service instance´s custom properties.

Specified by:
deleteCustomProperties in interface IServiceInstanceDao
Throws:
DaoException
PortalException

deleteCustomProperty

public void deleteCustomProperty(String serviceInstanceId,
                                 String name,
                                 ITransaction daoTransaction)
                          throws DaoException,
                                 PortalException
Description copied from interface: IServiceInstanceDao
Delete a service instance´s custom property.

Specified by:
deleteCustomProperty in interface IServiceInstanceDao
Throws:
DaoException
PortalException

getIdsOfDependentServiceInstances

public Collection<String> getIdsOfDependentServiceInstances(String serviceInstanceId,
                                                            ITransaction transaction)
                                                     throws PortalException
Description copied from interface: IServiceInstanceDao
Get the ids of all service instances that depends on the given service instance.

Specified by:
getIdsOfDependentServiceInstances in interface IServiceInstanceDao
Parameters:
serviceInstanceId - the service instance the returned service instances depend on.
transaction - the transaction for persistence access.
Returns:
the dependent service instances.
Throws:
PortalException

getIdsByServiceInstanceAndDependencyType

public Collection<String> getIdsByServiceInstanceAndDependencyType(String serviceInstanceId,
                                                                   String dependencyType,
                                                                   ITransaction transaction)
                                                            throws DaoException,
                                                                   PortalException
Description copied from interface: IServiceInstanceDao
Get the ids of the service instances that the given service instance depends on by the given dependency type.

Specified by:
getIdsByServiceInstanceAndDependencyType in interface IServiceInstanceDao
Parameters:
serviceInstanceId - the id of the service instance that depends on the returned service instances.
dependencyType - the type of dependency.
transaction - the transaction for persistence access.
Returns:
the ids of the service instances that the given service instance depends on by the given dependency type.
Throws:
ManagerException
PortalException
DaoException

addServiceInstanceDependency

public void addServiceInstanceDependency(ServiceInstanceDependencyConfig serviceInstanceDependencyConfig,
                                         ITransaction transaction)
                                  throws PortalException
Description copied from interface: IServiceInstanceDao
Add the given service instance dependency to the persistence.

Specified by:
addServiceInstanceDependency in interface IServiceInstanceDao
Parameters:
serviceInstanceDependencyConfig - the information about the dependency to be added.
transaction - the transaction for persistence access.
Throws:
PortalException

removeServiceInstanceDependencies

public void removeServiceInstanceDependencies(String dependentServiceInstanceId,
                                              String dependencyType,
                                              ITransaction transaction)
                                       throws PortalException
Description copied from interface: IServiceInstanceDao
Remove the service instance dependencies that matches the dependent service instance id and dependency type given.

Specified by:
removeServiceInstanceDependencies in interface IServiceInstanceDao
Throws:
PortalException

getChannelsChildren

public List<IChannelChild> getChannelsChildren(String parentChannelIds,
                                               boolean hideItems,
                                               String serviceId,
                                               IResource resource,
                                               Locale locale,
                                               ITransaction transaction)
                                        throws PortalException
Specified by:
getChannelsChildren in interface IServiceInstanceDao
Throws:
PortalException

getChildrenData

public List<IChannelChild> getChildrenData(String channelId,
                                           int hidePages,
                                           String serviceId,
                                           IResource resource,
                                           Locale locale,
                                           ITransaction transaction)
                                    throws DaoException,
                                           PortalException
Specified by:
getChildrenData in interface IServiceInstanceDao
Throws:
DaoException
PortalException

getDependencyIdsByServiceInstanceId

public Collection<String> getDependencyIdsByServiceInstanceId(String serviceInstanceId,
                                                              ITransaction transaction)
                                                       throws DaoException,
                                                              PortalException
Description copied from interface: IServiceInstanceDao
Get the ids of all the service instances that the given service instance depends on

Specified by:
getDependencyIdsByServiceInstanceId in interface IServiceInstanceDao
Returns:
the ids of the service instances that the given service instance depends on.
Throws:
DaoException
PortalException

getServiceInstanceDependency

public ServiceInstanceDependencyConfig getServiceInstanceDependency(String dependencyId,
                                                                    ITransaction transaction)
                                                             throws DaoException,
                                                                    PortalException
Description copied from interface: IServiceInstanceDao
Get a ServiceInstanceDependencyConfig by the dependencyId.

Specified by:
getServiceInstanceDependency in interface IServiceInstanceDao
Returns:
The ServiceInstanceDependencyConfig
Throws:
DaoException
PortalException


Lumisportal  5.5.0.091130 - Copyright © 2001-2007, Lumis. All Rights Reserved.