java-design-patterns
java-design-patterns copied to clipboard
Table Data Gateway pattern
Description:
The Table Data Gateway pattern provides a way to encapsulate all the SQL operations for a single table or view within a gateway class. This pattern allows for a single point of access to the data in a table, ensuring a clean separation between the database and the application logic. The key elements of the Table Data Gateway pattern include:
- Gateway Class: Encapsulates the database access logic for a specific table or view.
- CRUD Operations: Methods for Create, Read, Update, and Delete operations.
- Separation of Concerns: Decouples the SQL queries from the application logic, promoting single responsibility and easier maintenance.
- Reusability: Reusable and testable components that centralize data access logic.
References:
- Martin Fowler's Table Data Gateway: https://www.martinfowler.com/eaaCatalog/tableDataGateway.html
- Wikipedia: Table Data Gateway: https://en.wikipedia.org/wiki/Table_data_gateway
- Source Code Examples: Table Data Gateway: https://www.sourcecodeexamples.net/2018/04/table-data-gateway.html
- P of EAA
Acceptance Criteria:
- Implement a gateway class that encapsulates SQL operations for a specific table.
- Include methods for Create, Read, Update, and Delete operations within the gateway class.
- Ensure that the gateway class is well-documented and includes unit tests to verify its functionality.
Can I work on this issue?
Sure thing @guapi777
We are happy to have you here!
Please mention a timeline for when can we expect a PR against this issue.
Good luck 💯
I will fix this issue within one week. :)
Hi, could you assign this issue to me please? I am interested in fixing this issue.
All right @u7147694
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.