Package 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,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 Summary
Modifier and TypeMethodDescriptionbooleandeleteObject(Object object, boolean commit) formatDateTime(Date dateTime) Retrieves this factory's component settings.Retrieves this factory's application settings.Retrieves aConnectionto the application'sDataSource.Retrieves the application'sDAOFactory.Retrieves a utility object that provides useful methods for daos.Retrieves the application'sDataSource.com.google.inject.InjectorRetrieves theInjectorpreviously set.Retrieves theSettingspreviously set for this data access object.Retrieves aMapof the SQL statements used by the application.voidinitialize(Map transferMap) Initializes this data access object by copying incoming parameters into its properties.insertObject(Object object, boolean commit) loadAll()loadAll(org.hibernate.Filter filter) loadObject(Object object) parseDateTime(String dateTime) voidsetAppComponents(Properties appComponents) voidsetAppSettings(Properties appSettings) voidsetConnection(Connection connection) voidsetDaoFactory(DAOFactory daoFactory) voidsetDAOUtils(DAOUtils daoUtils) voidsetDataSource(DataSource dataSource) voidsetInjector(com.google.inject.Injector injector) Sets this object'sInjectorthat can be used to create other objects and inject them with dependencies.voidsetSettings(Settings settings) voidupdateObject(Object object, boolean commit)
-
Method Details
-
initialize
Initializes this data access object by copying incoming parameters into its properties. This method is used byDAOFactoryafter object creation to copy the application'sDAOFactoryandSettingsinto the new object. ThesqlMapanddataSourceproperties are also copied from theDAOFactory.- Parameters:
transferMap- AMapcontaining objects such as the application'sDAOFactoryandSettings.- Throws:
Exception
-
getSettings
Settings getSettings()Retrieves theSettingspreviously set for this data access object.- Returns:
- A
Settingsobject that represents various settings for the system.
-
setSettings
-
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
-
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 theSettingsBean, which stores settings drawn from the database. -
setAppSettings
-
getConnection
Connection getConnection()Retrieves aConnectionto the application'sDataSource.- Returns:
- A
Connectionto the application'sDataSource.
-
setConnection
-
getDataSource
DataSource getDataSource()Retrieves the application'sDataSource.- Returns:
- The application's
DataSource.
-
setDataSource
-
getDaoFactory
DAOFactory getDaoFactory()Retrieves the application'sDAOFactory.- Returns:
- The application's
DAOFactory.
-
setDaoFactory
-
getSqlMap
Map getSqlMap()Retrieves aMapof the SQL statements used by the application.- Returns:
- A
Mapof the SQL statements used by the application.
-
setSqlMap
-
getInjector
com.google.inject.Injector getInjector()Retrieves theInjectorpreviously set.- Returns:
- A
Injectorobject that can be used to create other objects and inject them with dependencies.
-
setInjector
void setInjector(com.google.inject.Injector injector) Sets this object'sInjectorthat can be used to create other objects and inject them with dependencies.- Parameters:
injector- The currentInjectorfor 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
-
loadObject
- Throws:
Exception
-
updateObject
- Throws:
Exception
-
deleteObject
- Throws:
Exception
-
insertObject
- Throws:
Exception
-
loadAll
- Throws:
Exception
-
loadAll
- Throws:
Exception
-
formatDateTime
-
parseDateTime
- Throws:
Exception
-