java-jdbc-dao

Generates JDBC DAO classes for Java entities mirroring existing project persistence patterns.

1|Updated Jul 7, 2026
One-click install
npx skills add https://github.com/codjeremias-cell/Orquestrador-fable --skill java-jdbc-dao-codjeremias-cell
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: java-jdbc-dao
Source: https://github.com/codjeremias-cell/Orquestrador-fable/tree/main/skills/java-jdbc-dao
Command: npx skills add https://github.com/codjeremias-cell/Orquestrador-fable --skill java-jdbc-dao-codjeremias-cell

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing a new DAO by hand often produces code that clashes with the project's existing persistence style — wrong retry placement, inconsistent logging, unsafe SQL, or guessed column names. This Skill creates or completes a JDBC DAO/repository for a Java entity that is indistinguishable from the DAOs already in the project. ## Core Features & Use Cases - Pattern-mirroring DAO generation: Reads an existing DAO plus the connection provider to detect where retry, locking, and logging live, then writes the new DAO in that exact form instead of imposing a fixed style. - Non-negotiable safety invariants: Enforces parameterized PreparedStatement for all external input (anti-injection), try-with-resources on every Connection/Statement/ResultSet, explicit column lists (never SELECT *), and atomic transactions only for multi-step operations. - Real round-trip verification: Compiles the DAO and, when a test database is available, runs insert → findById → list → delete to prove the column-to-field mapping, with declared skips when no database exists. - Use Case: In a Java desktop app using UCanAccess/Access, ask for the DAO of a Training entity and receive a class in the project's persistence package with PT-BR methods, snake_case columns, void writes, and clean throws SQLException propagation because retry and logging live in the Database provider. ## Quick Start Ask the assistant to create the JDBC DAO for a specific entity, naming the real table and columns or authorizing it to read them from the project schema.

Frequently Asked Questions about java-jdbc-dao

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a JDBC DAO for a Java entity?▼

Provide the target entity, the desired operations (insert, update, delete, findById, list), and the real table and column names. The Skill reads an existing DAO and the connection provider, then writes the new DAO in the project's exact persistence style.

How to prevent SQL injection in JDBC DAO code?▼

Every external value goes through a PreparedStatement parameter placeholder, never string concatenation into the query. Queries without external input, such as SELECT COUNT(*), may use a plain Statement.

Where should retry and transaction logic live in a JDBC project?▼

It depends on the project: some place retry and locking in the connection provider so DAOs stay clean, while others call a retry helper inside the DAO. The Skill detects the existing placement and mirrors it; in greenfield projects the transaction opens in the DAO as a declared assumption.

Does this DAO generator work with UCanAccess and Microsoft Access databases?▼

Yes, it accounts for single-connection concurrency constraints typical of UCanAccess/Access setups, where serialization is handled by the connection provider rather than the DAO. It never opens connections outside the project's single provider.

When should I not use this DAO generation skill?▼

Do not use it to create the entity class itself, the UI screen, or business logic — those belong to separate entity, screen, and service-layer skills. It also refuses to generate code when table or column names are unconfirmed, asking instead of guessing.