dto-implementation

Automate DTO construction and direct JPQL queries for HMIS.

224|136|Updated Jul 12, 2014
One-click install
npx skills add https://github.com/hmislk/hmis --skill dto-implementation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dto-implementation
Source: https://github.com/hmislk/hmis/tree/main/.claude/skills/dto-implementation
Command: npx skills add https://github.com/hmislk/hmis --skill dto-implementation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

DTO implementation guidelines for HMIS help developers create and modify DTOs safely, enforce constructor rules, enable direct JPQL queries, and ensure consistent navigation and null handling across reports and UI layers.

Core Features & Use Cases

  • Enforces never modifying existing constructors; allows adding new ones
  • Promotes direct DTO queries via JPQL; avoids entity-to-DTO loops
  • Guides DTO-based reporting and navigation patterns across the HMIS codebase

Quick Start

Create a sample DTO and implement a JPQL constructor query using the direct DTO query pattern described.

Frequently Asked Questions about dto-implementation

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

FAQPage Schema
How do I write JPQL constructor queries for DTOs in Hibernate?

JPQL constructor queries for DTOs allow you to directly map persisted fields into a Data Transfer Object without looping through entities. This Skill automates generating safe DTO queries while enforcing null-handling and navigation patterns across your codebase.

What is the best way to generate DTO-based reports without entity-to-DTO loops?

Generating DTO-based reports is best handled by directly querying persisted fields via JPQL. This approach avoids entity-to-DTO loops and enforces consistent navigation patterns, ensuring wrapper-type null safety across reporting layers.

Can I modify existing constructors when implementing a DTO?

Implementing a DTO safely requires never modifying existing constructors, though adding new ones is allowed. This constraint preserves codebase stability while enabling direct JPQL querying and consistent data navigation.

How does wrapper-type null safety work with direct JPQL queries?

Wrapper-type null safety in direct JPQL queries ensures that nullable persisted fields map correctly to DTO wrapper types without throwing errors. This enforces consistent null-handling patterns across navigation and reporting layers.

When do I need to use direct DTO queries instead of entity loops for persistence?

Direct DTO queries are needed for persistence when you want to fetch specific fields efficiently without loading full entities. This pattern enforces safe navigation and null-handling while satisfying requirements for wrapper-type null safety in JPQL.