judo-runtime:dao-patterns

Explains JUDO DAO Core patterns including payload processors, statement types, and collectors.

Updated May 5, 2022
One-click install
npx skills add https://github.com/BlackBeltTechnology/judo-runtime-core --skill judo-runtime-dao-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: judo-runtime:dao-patterns
Source: https://github.com/BlackBeltTechnology/judo-runtime-core/tree/main/judo-runtime-core-dao-core/src/main/resources/claude/plugins/judo-dao-core/skills/dao-patterns
Command: npx skills add https://github.com/BlackBeltTechnology/judo-runtime-core --skill judo-runtime-dao-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill clarifies the intricate patterns within the JUDO DAO Core layer, enabling developers to effectively work with data access operations, implement custom processors, and understand the underlying DAO architecture.

Core Features & Use Cases

  • Payload Processing: Understand how data transfer objects are processed for inserts, updates, and deletes.
  • Statement Generation: Learn about the different types of SQL statements generated for data manipulation.
  • Instance Collection: Grasp how entity graphs are collected and traversed for operations like deletion.
  • Use Case: When implementing a new data entity, use this Skill to understand the correct way to structure your payload processors and generate the necessary statements for persistence.

Quick Start

Explain the purpose of the InsertPayloadDaoProcessor and its role in generating statements for new entities.

Frequently Asked Questions about judo-runtime:dao-patterns

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

FAQPage Schema
How do JUDO DAO payload processors handle data manipulation?

JUDO DAO payload processors handle data manipulation by processing data transfer objects for inserts, updates, and deletes. The InsertPayloadDaoProcessor specifically generates the SQL statements required for persisting new entities. These processors ensure robust data manipulation logic through recursive insertion, merge updates, and cascade deletion mechanisms.

What is the role of instance collectors in JUDO data access operations?

Instance collectors in JUDO data access operations gather and traverse entity graphs for complex actions like deletion. They enable cascade deletion mechanisms by ensuring all related instances within the entity graph are collected and properly processed during a single data access operation.

How do I implement custom processors for new data entities in JUDO?

To implement custom processors for new data entities in JUDO, structure your payload processors to generate the necessary SQL statements for persistence. Use the InsertPayloadDaoProcessor as a foundation to understand statement generation and adapt the architecture to support recursive insertion and merge updates.

When should I use recursive insertion and cascade deletion in a DAO architecture?

You should use recursive insertion and cascade deletion in a DAO architecture when manipulating complex entity graphs that require synchronized persistence. Recursive insertion handles nested data structures, while cascade deletion ensures all related instances are removed automatically during data access operations.

Does the JUDO DAO framework support merge updates for existing records?

Yes, the JUDO DAO framework supports merge updates for existing records as part of its core data manipulation logic. Merge updates are integrated into the payload processing architecture, allowing developers to update entities by merging new data with existing persisted records.

What are the different SQL statement types generated by JUDO DAO processors?

JUDO DAO processors generate different SQL statement types for data manipulation, including statements for inserts, merge updates, and cascade deletions. The specific statement type depends on the payload processor used, such as the InsertPayloadDaoProcessor for creating new entity persistence logic.