Class ServicePackageDao


  • public class ServicePackageDao
    extends java.lang.Object
    DAO for loading ServicePackage records from the database. Results are returned in sort_order sequence.
    • Constructor Summary

      Constructors 
      Constructor Description
      ServicePackageDao​(javax.sql.DataSource dataSource)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<ServicePackage> findAll()
      Returns all service packages ordered by sort_order.
      java.util.List<java.lang.Integer> findServiceIdsForPackage​(int packageId)
      Returns the IDs of services belonging to the given package.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ServicePackageDao

        public ServicePackageDao​(javax.sql.DataSource dataSource)
        Parameters:
        dataSource - the application data source
    • Method Detail

      • findServiceIdsForPackage

        public java.util.List<java.lang.Integer> findServiceIdsForPackage​(int packageId)
        Returns the IDs of services belonging to the given package.
        Parameters:
        packageId - the ID of the service package
        Returns:
        a non-null, possibly empty list of service IDs
        Throws:
        java.lang.RuntimeException - if the query fails
      • findAll

        public java.util.List<ServicePackage> findAll()
        Returns all service packages ordered by sort_order.
        Returns:
        a non-null, possibly empty list of ServicePackage objects
        Throws:
        java.lang.RuntimeException - if the query fails