2.2. The Components of the Data Access Objects API

There are a number of classes that make up the IBatisNet.DataAccess API. Each has a very specific and important role. The following table lists the classes and a brief description. The next sections will provide more detail on how to use these classes.

Table 2.1. IBatisNet.DataAccess API Classes

Class/Interface (Patterns)Description
DomDaoManagerBuilderResponsible for configuration of the DAO framework (via dao.config), instantiating DAO implementations and IDaoManager instances.
IDaoManager (Facade)Acting as a façade to the rest of the API.
IDalSession (Marker Interface)A generic marker interface for a database session. A common implementation would wrap an ADO.NET connection/transaction object.
DataAccessException (Runtime Exception)All methods and classes in the DAO API throw this exception exclusively. DAO implementations should also throw this exception exclusively and avoid throwing any other exception type by nesting them within the DataAccessException.
IDao (Marker Interface)A marker interface for all DAO implementations. This interface must be implemented by all DAO classes. This interface does not declare any methods to be implemented and only acts as a marker (i.e. something for the XML-based DaoFactory to identify the class by).