Skip to content

DAO Factory pattern #1270

Open
Open
@iluwatar

Description

@iluwatar
Owner

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.

Activity

ilhan-mstf

ilhan-mstf commented on Oct 10, 2020

@ilhan-mstf

Hi, I would like to work on this issue. Can you assign it to me?

iluwatar

iluwatar commented on Nov 7, 2020

@iluwatar
OwnerAuthor
NatalieSty

NatalieSty commented on Oct 14, 2021

@NatalieSty

@ilhan-mstf are you still working on this issue? Thanks.

ilhan-mstf

ilhan-mstf commented on Oct 15, 2021

@ilhan-mstf

not actually, sorry

removed their assignment
on Oct 15, 2021
NatalieSty

NatalieSty commented on Oct 16, 2021

@NatalieSty

@iluwatar I'd like to work on this issue, can you assign it to me? Thanks!

iluwatar

iluwatar commented on Oct 19, 2021

@iluwatar
OwnerAuthor

27 remaining items

moved this from In Progress to Todo in Java Design Patterns projecton Dec 1, 2022
removed
status: staleissues and pull requests that have not had recent interaction
on Dec 1, 2022
github-actions

github-actions commented on Jan 9, 2025

@github-actions

This issue is stale because it has been open 60 days with no activity.

letdtcode

letdtcode commented on Apr 15, 2025

@letdtcode

Could you assign this issue to me? I'd like to resolve it

moved this from Todo to In Progress in Java Design Patterns projecton Apr 15, 2025
letdtcode

letdtcode commented on Apr 27, 2025

@letdtcode

@iluwatar I've completed the implementation and am now writing unit tests. Could you let me know what the target code coverage percentage should be for this project ?

linked a pull request that will close this issue on May 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

    Participants

    @iluwatar@ilhan-mstf@NatalieSty@AlexTamulaitis@rrreynaldo

    Issue actions

      DAO Factory pattern · Issue #1270 · iluwatar/java-design-patterns