Skip to content
Bluetape4k docs1.11

JPA with Blaze-Persistence

Latest stable Based on Bluetape4k release 1.11.0

This module demonstrates JPA query patterns with Blaze Persistence: Criteria Builder, Entity Views, offset pagination, keyset pagination, and count metadata. This manual connects that purpose to the current build, source entry points, tests, configuration resources, and lifecycle evidence instead of duplicating the README feature list.

Use bluetape4k-examples-jpa-blazepersistence-demo when the application needs the runnable entry point, required services, expected behavior, and the production pattern demonstrated. Start with the source entry points below and confirm that their ownership and failure contracts match the calling component. Prefer a smaller standard-library or already-adopted module when it satisfies the same contract without another runtime boundary.

This example project is not published as a Maven artifact. Run it from the repository and inspect its Gradle tasks before choosing a command.

Gradle project path: :bluetape4k-examples-jpa-blazepersistence-demo. Source directory: examples/jpa-blazepersistence-demo.

The first source-level concepts to inspect are BlazePersistenceConfiguration, MemberPage, MemberSearchCondition, Member, Team, MemberBlazeRepository, MemberSummaryView, and MemberTeamView. File names are navigation anchors; read each declaration and its tests before treating it as a public contract.

List the project tasks before running the example or benchmark:

Terminal window
./gradlew :bluetape4k-examples-jpa-blazepersistence-demo:tasks --all

Then use the command documented by the module README and keep required external services isolated.

Entry pointWhat to verify
BlazePersistenceConfigurationInspect this declaration’s constructors, functions, and ownership contract.
MemberPageInspect this declaration’s constructors, functions, and ownership contract.
MemberSearchConditionInspect this declaration’s constructors, functions, and ownership contract.
MemberInspect this declaration’s constructors, functions, and ownership contract.
TeamInspect this declaration’s constructors, functions, and ownership contract.
MemberBlazeRepositoryInspect this declaration’s constructors, functions, and ownership contract.
MemberSummaryViewInspect this declaration’s constructors, functions, and ownership contract.
MemberTeamViewInspect this declaration’s constructors, functions, and ownership contract.

The README evidence is organized around Why Blaze Persistence, Example Coverage, Domain Model and Read Path, Core Usage, Entity View Registration, Dynamic Criteria Query, Entity View Pagination, Querydsl Migration Notes, Dependencies, and How to Run. Use those topics as a navigation map, then confirm behavior in source and tests. Keep adoption narrow and connect owned resources to the caller lifecycle.

The current build declares these integration edges:

implementation(platform(libs.spring.boot.dependencies))
implementation(project(":bluetape4k-hibernate"))
implementation(libs.jakarta.annotation.api)
implementation(libs.jakarta.persistence.api.v32)
implementation(libs.hibernate.core)
implementation(libs.blaze.persistence.core.api.jakarta)
runtimeOnly(libs.blaze.persistence.core.impl.jakarta)
implementation(libs.blaze.persistence.entity.view.api.jakarta)
runtimeOnly(libs.blaze.persistence.entity.view.impl.jakarta)
implementation(libs.blaze.persistence.jpa.criteria.api.jakarta)
runtimeOnly(libs.blaze.persistence.jpa.criteria.impl.jakarta)
runtimeOnly(libs.blaze.persistence.integration.hibernate7)

Treat compileOnly edges as caller-provided capabilities and verify runtime availability before using their APIs.

No module-level configuration resource was found under src/main/resources. Configuration is supplied through constructors, builders, function arguments, or the integrating framework; confirm defaults in source.

Failure semantics are defined by the linked entry points and tests, not inferred from the artifact name. Keep cancellation and timeout signals intact, close owned resources, and translate backend exceptions only at a boundary that can add a stable domain contract. Use the test anchors below to verify the exact behavior before adding retries or fallbacks.

Run the example in an isolated environment and observe startup, dependency health, requests, and shutdown. Keep capacity, timeout, retry, and shutdown settings next to the component that owns the resource; avoid process-wide defaults that hide which caller accepted the trade-off.

Run the module test task:

Terminal window
./gradlew :bluetape4k-examples-jpa-blazepersistence-demo:test --no-configuration-cache

Representative test anchors:

No dedicated workshop path is registered in the manual manifest. Use the module README and the representative tests above as runnable evidence.

This page documents the repository state represented by the linked source and tests. It does not turn optional backends into application defaults or claim performance without a benchmark artifact. Re-check compatibility and lifecycle notes when the module version changes.

These diagrams are loaded directly from README assets published with the 1.11.0 release and pinned to its immutable commit. They describe this manual’s released structure and runtime flows, not later Snapshot changes. Select a preview to open the SVG at the same release commit.

Domain Model and Read Path diagram

Release README: examples/jpa-blazepersistence-demo/README.md