com.softslate.commerce.daos.core
Interface DAOInterface

All Known Subinterfaces:
AdministratorDAO, AdministratorGatewayDAO, AttributeDAO, AttributeGatewayDAO, BasicTaxRateDAO, BasicTaxRateGatewayDAO, CategoryDAO, CategoryGatewayDAO, CategorySettingDAO, CountryDAO, CountryGatewayDAO, CustomerAddressDAO, CustomerAddressGatewayDAO, CustomerDAO, CustomerGatewayDAO, DiscountDAO, DiscountGatewayDAO, DiscountRangeDAO, DiscountRangeGatewayDAO, ManufacturerDAO, ManufacturerGatewayDAO, OptionDAO, OptionGatewayDAO, OrderDAO, OrderDeliveryDAO, OrderDeliveryGatewayDAO, OrderDiscountDAO, OrderDiscountGatewayDAO, OrderGatewayDAO, OrderItemAttributeDAO, OrderItemAttributeGatewayDAO, OrderItemDAO, OrderItemGatewayDAO, OrderShippingRuleDAO, OrderShippingRuleGatewayDAO, PaymentDAO, PaymentGatewayDAO, ProductDAO, ProductGatewayDAO, ProductSettingDAO, RoleDAO, RoleGatewayDAO, SettingsDAO, ShippingMethodDAO, ShippingMethodGatewayDAO, ShippingRateDAO, ShippingRateGatewayDAO, ShippingRuleDAO, ShippingRuleGatewayDAO, ShippingRuleRangeDAO, ShippingRuleRangeGatewayDAO, SKUDAO, SKUGatewayDAO, StateDAO, StateGatewayDAO
All Known Implementing Classes:
AdministratorDAOHibernate, AdministratorGatewayDAOHibernate, AttributeDAOHibernate, AttributeGatewayDAOHibernate, BaseAdminGatewayDAOHibernate, BaseDAO, BasicTaxRateDAOHibernate, BasicTaxRateGatewayDAOHibernate, CategoryDAOHibernate, CategoryGatewayDAOHibernate, CategorySettingDAOHibernate, CountryDAOHibernate, CountryGatewayDAOHibernate, CustomerAddressDAOHibernate, CustomerAddressGatewayDAOHibernate, CustomerDAOHibernate, CustomerGatewayDAOHibernate, DiscountDAOHibernate, DiscountGatewayDAOHibernate, DiscountRangeDAOHibernate, DiscountRangeGatewayDAOHibernate, InstallerDAOBasic, ManufacturerDAOHibernate, ManufacturerGatewayDAOHibernate, OptionDAOHibernate, OptionGatewayDAOHibernate, OrderDAOHibernate, OrderDeliveryDAOHibernate, OrderDeliveryGatewayDAOHibernate, OrderDiscountDAOHibernate, OrderDiscountGatewayDAOHibernate, OrderGatewayDAOHibernate, OrderItemAttributeDAOHibernate, OrderItemAttributeGatewayDAOHibernate, OrderItemDAOHibernate, OrderItemGatewayDAOHibernate, OrderShippingRuleDAOHibernate, OrderShippingRuleGatewayDAOHibernate, PaymentDAOHibernate, PaymentGatewayDAOHibernate, ProductDAOHibernate, ProductGatewayDAOHibernate, ProductSettingDAOHibernate, RoleDAOHibernate, RoleGatewayDAOHibernate, SettingsDAOHibernate, ShippingMethodDAOHibernate, ShippingMethodGatewayDAOHibernate, ShippingRateDAOHibernate, ShippingRateGatewayDAOHibernate, ShippingRuleDAOHibernate, ShippingRuleGatewayDAOHibernate, ShippingRuleRangeDAOHibernate, ShippingRuleRangeGatewayDAOHibernate, SKUDAOHibernate, SKUGatewayDAOHibernate, StateDAOHibernate, StateGatewayDAOHibernate, 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 Summary
 boolean deleteObject(java.lang.Object object, boolean commit)
           
 java.util.Properties getAppComponents()
          Retrieves this factory's component settings.
 java.util.Properties getAppSettings()
          Retrieves this factory's application settings.
 java.sql.Connection getConnection()
          Retrieves a Connection to the application's DataSource.
 DAOFactory getDaoFactory()
          Retrieves the application's DAOFactory.
 DAOUtils getDAOUtils()
          Retrieves a utility object that provides useful methods for daos.
 javax.sql.DataSource getDataSource()
          Retrieves the application's DataSource.
 Settings getSettings()
          Retrieves the Settings previously set for this data access object.
 java.util.Map getSqlMap()
          Retrieves a Map of the SQL statements used by the application.
 void initialize(java.util.Map transferMap)
          Initializes this data access object by copying incoming parameters into its properties.
 java.lang.Object insertObject(java.lang.Object object, boolean commit)
           
 java.util.Collection loadAll()
           
 java.util.Collection loadAll(org.hibernate.Filter filter)
           
 java.lang.Object loadObject(java.lang.Object object)
           
 void setAppComponents(java.util.Properties appComponents)
           
 void setAppSettings(java.util.Properties appSettings)
           
 void setConnection(java.sql.Connection connection)
           
 void setDaoFactory(DAOFactory daoFactory)
           
 void setDAOUtils(DAOUtils daoUtils)
           
 void setDataSource(javax.sql.DataSource dataSource)
           
 void setSettings(Settings settings)
           
 void setSqlMap(java.util.Map sqlMap)
           
 java.lang.Object updateObject(java.lang.Object object, boolean commit)
           
 

Method Detail

initialize

void initialize(java.util.Map transferMap)
                throws java.lang.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:
java.lang.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

java.util.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(java.util.Properties appComponents)

getAppSettings

java.util.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(java.util.Properties appSettings)

getConnection

java.sql.Connection getConnection()
Retrieves a Connection to the application's DataSource.

Returns:
A Connection to the application's DataSource.

setConnection

void setConnection(java.sql.Connection connection)

getDataSource

javax.sql.DataSource getDataSource()
Retrieves the application's DataSource.

Returns:
The application's DataSource.

setDataSource

void setDataSource(javax.sql.DataSource dataSource)

getDaoFactory

DAOFactory getDaoFactory()
Retrieves the application's DAOFactory.

Returns:
The application's DAOFactory.

setDaoFactory

void setDaoFactory(DAOFactory daoFactory)

getSqlMap

java.util.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(java.util.Map sqlMap)

getDAOUtils

DAOUtils getDAOUtils()
Retrieves a utility object that provides useful methods for daos.

Returns:
An implementation of DAOUtils.

setDAOUtils

void setDAOUtils(DAOUtils daoUtils)

loadObject

java.lang.Object loadObject(java.lang.Object object)
                            throws java.lang.Exception
Throws:
java.lang.Exception

updateObject

java.lang.Object updateObject(java.lang.Object object,
                              boolean commit)
                              throws java.lang.Exception
Throws:
java.lang.Exception

deleteObject

boolean deleteObject(java.lang.Object object,
                     boolean commit)
                     throws java.lang.Exception
Throws:
java.lang.Exception

insertObject

java.lang.Object insertObject(java.lang.Object object,
                              boolean commit)
                              throws java.lang.Exception
Throws:
java.lang.Exception

loadAll

java.util.Collection loadAll()
                             throws java.lang.Exception
Throws:
java.lang.Exception

loadAll

java.util.Collection loadAll(org.hibernate.Filter filter)
                             throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © SoftSlate, LLC 2003–2005