Interface DAOInterface

All Known Subinterfaces:
AdministratorDAO, AdministratorGatewayDAO, AttributeDAO, AttributeGatewayDAO, BasicTaxRateDAO, BasicTaxRateGatewayDAO, CategoryDAO, CategoryGatewayDAO, CategorySettingDAO, CountryDAO, CountryGatewayDAO, CustomerAddressDAO, CustomerAddressGatewayDAO, CustomerDAO, CustomerGatewayDAO, CustomerWishListDAO, CustomerWishListGatewayDAO, DiscountDAO, DiscountGatewayDAO, DiscountRangeDAO, DiscountRangeGatewayDAO, EmailDAO, EmailGatewayDAO, EmailOptOutDAO, EmailOptOutGatewayDAO, ManufacturerDAO, ManufacturerGatewayDAO, OptionDAO, OptionGatewayDAO, OrderDAO, OrderDeliveryDAO, OrderDeliveryGatewayDAO, OrderDiscountDAO, OrderDiscountGatewayDAO, OrderGatewayDAO, OrderItemAttributeDAO, OrderItemAttributeGatewayDAO, OrderItemDAO, OrderItemGatewayDAO, OrderSettingDAO, OrderShippingRuleDAO, OrderShippingRuleGatewayDAO, PaymentDAO, PaymentGatewayDAO, ProductDAO, ProductGatewayDAO, ProductReviewDAO, ProductReviewGatewayDAO, ProductSettingDAO, ProductSettingGatewayDAO, RequestLogDAO, RequestLogGatewayDAO, RoleDAO, RoleGatewayDAO, SettingsDAO, ShippingMethodDAO, ShippingMethodGatewayDAO, ShippingRateDAO, ShippingRateGatewayDAO, ShippingRuleDAO, ShippingRuleGatewayDAO, ShippingRuleRangeDAO, ShippingRuleRangeGatewayDAO, SKUDAO, SKUGatewayDAO, StateDAO, StateGatewayDAO, TemplateDAO, TemplateGatewayDAO
All Known Implementing Classes:
AdministratorDAOHibernate, AdministratorGatewayDAOHibernate, AttributeDAOHibernate, AttributeGatewayDAOHibernate, BaseAdminGatewayDAOHibernate, BaseDAO, BasicTaxRateDAOHibernate, BasicTaxRateGatewayDAOHibernate, CategoryDAOHibernate, CategoryGatewayDAOHibernate, CategorySettingDAOHibernate, CountryDAOHibernate, CountryGatewayDAOHibernate, CustomerAddressDAOHibernate, CustomerAddressGatewayDAOHibernate, CustomerDAOHibernate, CustomerGatewayDAOHibernate, CustomerWishListDAOHibernate, CustomerWishListGatewayDAOHibernate, DiscountDAOHibernate, DiscountGatewayDAOHibernate, DiscountRangeDAOHibernate, DiscountRangeGatewayDAOHibernate, EmailDAOHibernate, EmailGatewayDAOHibernate, EmailOptOutDAOHibernate, EmailOptOutGatewayDAOHibernate, InstallerDAOBasic, LiquibaseDAOImpl, ManufacturerDAOHibernate, ManufacturerGatewayDAOHibernate, OptionDAOHibernate, OptionGatewayDAOHibernate, OrderDAOHibernate, OrderDeliveryDAOHibernate, OrderDeliveryGatewayDAOHibernate, OrderDiscountDAOHibernate, OrderDiscountGatewayDAOHibernate, OrderGatewayDAOHibernate, OrderItemAttributeDAOHibernate, OrderItemAttributeGatewayDAOHibernate, OrderItemDAOHibernate, OrderItemGatewayDAOHibernate, OrderSettingDAOHibernate, OrderShippingRuleDAOHibernate, OrderShippingRuleGatewayDAOHibernate, PaymentDAOHibernate, PaymentGatewayDAOHibernate, ProductDAOHibernate, ProductGatewayDAOHibernate, ProductReviewDAOHibernate, ProductReviewGatewayDAOHibernate, ProductSettingDAOHibernate, ProductSettingGatewayDAOHibernate, RequestLogDAOHibernate, RequestLogGatewayDAOHibernate, RoleDAOHibernate, RoleGatewayDAOHibernate, SettingsDAOHibernate, ShippingMethodDAOHibernate, ShippingMethodGatewayDAOHibernate, ShippingRateDAOHibernate, ShippingRateGatewayDAOHibernate, ShippingRuleDAOHibernate, ShippingRuleGatewayDAOHibernate, ShippingRuleRangeDAOHibernate, ShippingRuleRangeGatewayDAOHibernate, SKUDAOHibernate, SKUGatewayDAOHibernate, StateDAOHibernate, StateGatewayDAOHibernate, TemplateDAOHibernate, TemplateGatewayDAOHibernate, UpgradesDAOBasic

public interface DAOInterface
A parent interface for all of the other interfaces in the data access layer.

The methods provided allow implementations to communicate with other elements of the application. In particular, retrieve settings (using getSettings()), retrieve database connections (using getConnection()), retrieve SQL statements (using getSqlMap()), and create other data access objects (using getDaoFactory()).

Author:
David Tobey
  • Method Details

    • initialize

      void initialize(Map transferMap) throws Exception
      Initializes this data access object by copying incoming parameters into its properties. This method is used by DAOFactory after object creation to copy the application's DAOFactory and Settings into the new object. The sqlMap and dataSource properties are also copied from the DAOFactory.
      Parameters:
      transferMap - A Map containing objects such as the application's DAOFactory and Settings.
      Throws:
      Exception
    • getSettings

      Settings getSettings()
      Retrieves the Settings previously set for this data access object.
      Returns:
      A Settings object that represents various settings for the system.
    • setSettings

      void setSettings(Settings settings)
    • getAppComponents

      Properties getAppComponents()
      Retrieves this factory's component settings. The component settings identify which Java class implement the various Interfaces used by the system.
    • setAppComponents

      void setAppComponents(Properties appComponents)
    • getAppSettings

      Properties getAppSettings()
      Retrieves this factory's application settings. The current application settings for the system. This factory will pass the application settings to every DAO it creates. The application settings are settings for information unique to a given installation, such as the location of files on the server, as opposed to the SettingsBean, which stores settings drawn from the database.
    • setAppSettings

      void setAppSettings(Properties appSettings)
    • getConnection

      Connection getConnection()
      Retrieves a Connection to the application's DataSource.
      Returns:
      A Connection to the application's DataSource.
    • setConnection

      void setConnection(Connection connection)
    • getDataSource

      DataSource getDataSource()
      Retrieves the application's DataSource.
      Returns:
      The application's DataSource.
    • setDataSource

      void setDataSource(DataSource dataSource)
    • getDaoFactory

      DAOFactory getDaoFactory()
      Retrieves the application's DAOFactory.
      Returns:
      The application's DAOFactory.
    • setDaoFactory

      void setDaoFactory(DAOFactory daoFactory)
    • getSqlMap

      Map getSqlMap()
      Retrieves a Map of the SQL statements used by the application.
      Returns:
      A Map of the SQL statements used by the application.
    • setSqlMap

      void setSqlMap(Map sqlMap)
    • getInjector

      com.google.inject.Injector getInjector()
      Retrieves the Injector previously set.
      Returns:
      A Injector object that can be used to create other objects and inject them with dependencies.
    • setInjector

      void setInjector(com.google.inject.Injector injector)
      Sets this object's Injector that can be used to create other objects and inject them with dependencies.
      Parameters:
      injector - The current Injector for the system, which can be used to create other objects and inject them with dependencies.
    • getDAOUtils

      DAOUtils getDAOUtils()
      Retrieves a utility object that provides useful methods for daos.
      Returns:
      An implementation of DAOUtils.
    • setDAOUtils

      void setDAOUtils(DAOUtils daoUtils)
    • loadObject

      Object loadObject(Object object) throws Exception
      Throws:
      Exception
    • updateObject

      Object updateObject(Object object, boolean commit) throws Exception
      Throws:
      Exception
    • deleteObject

      boolean deleteObject(Object object, boolean commit) throws Exception
      Throws:
      Exception
    • insertObject

      Object insertObject(Object object, boolean commit) throws Exception
      Throws:
      Exception
    • loadAll

      Collection loadAll() throws Exception
      Throws:
      Exception
    • loadAll

      Collection loadAll(org.hibernate.Filter filter) throws Exception
      Throws:
      Exception
    • formatDateTime

      String formatDateTime(Date dateTime)
    • parseDateTime

      Date parseDateTime(String dateTime) throws Exception
      Throws:
      Exception