Skip to content

DAO Factory pattern #1270

Open
Open
@iluwatar

Description

@iluwatar

Description:
The DAO (Data Access Object) Factory design pattern is used to abstract and encapsulate all access to the data source, providing a clean separation between the business logic and the data access logic. This pattern enables the application to switch between different data sources and provides a mechanism to manage the data access objects efficiently.

Main elements of the pattern:

  • DAO Interface: Defines the standard operations to be performed on a model object(s).
  • Concrete DAO Class: Implements the DAO interface and handles the CRUD operations with the data source.
  • DAO Factory Interface: Provides a way to get the appropriate DAO based on the data source.
  • Concrete DAO Factory Class: Implements the DAO Factory interface and returns instances of the specific DAO.

References:

  1. DAO Factory Design Pattern - Oracle
  2. Java Design Patterns - DAO

Acceptance Criteria:

  1. Implement the DAO interface and at least one concrete DAO class for a model object.
  2. Create a DAO Factory interface and a concrete implementation of the DAO Factory that returns instances of the concrete DAO.
  3. Ensure that the implementation is well-documented and includes unit tests for the DAO methods and factory.

Metadata

Metadata

Assignees

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions