Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By alfonsoristoratov1.9.0MITIn 1 marketplace
Write, migrate and debug type-safe Spring Data JPA queries in Kotlin using property references instead of string paths. Adds a Hibernate extension module that requires the core module as a dependency.
Trending plugins
7-day copy clicks
Claude loads one when your task matches it, or you run it by name.
1 marketplace, most starred first
jpa, spring-data-jpa, hibernate, specification, type-safe-queries, query-builder
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
A Kotlin DSL for building type-safe JPA queries using idiomatic Kotlin syntax. The library provides three distinct DSLs:
Predicate objects for use within Specification or PredicateSpecificationSpecification<T> queriesPredicateSpecification<T> queriesThis is achieved with zero runtime overhead by providing extension functions on Kotlin property references
KProperty1<T, P>, letting you write type-safe predicates directly from property references.
Specification {} or PredicateSpecification {}::) - implemented as extension functions on
KProperty1<T, ?>and and or operatorsBelow is a short comparison showing how a simple specification looks with plain Spring Data JPA (without the DSL) and how the same logic becomes concise using this Kotlin DSL.
Without the DSL:
val spec = Specification<User> { root, query, cb ->
val namePath = root.get<String>("name")
val agePath = root.get<Int>("age")
cb.and(
cb.equal(namePath, "Alice"),
cb.greaterThan(agePath, 18)
)
}
repository.findAll(spec)
With the DSL:
repository.findAll(User::name.equal("Alice") and User::age.greaterThan(18))
jpa-spec-kotlin-dsl)The standard DSL - works with any JPA provider. Provides all predicate, specification, and predicate-specification extensions for equality, comparison, inclusion, nullability, string, collection, join, fetch, and bool operations.
jpa-spec-kotlin-dsl-hibernate)Hibernate-specific extensions that build on the core DSL. Requires the core module to also be declared as a dependency.
dependencies {
implementation("io.github.alfonsoristorato:jpa-spec-kotlin-dsl:<version>")
}
dependencies {
implementation 'io.github.alfonsoristorato:jpa-spec-kotlin-dsl:<version>'
}
<dependency>
<groupId>io.github.alfonsoristorato</groupId>
<artifactId>jpa-spec-kotlin-dsl</artifactId>
<version>version</version>
</dependency>
dependencies {
implementation("io.github.alfonsoristorato:jpa-spec-kotlin-dsl:<version>")
implementation("io.github.alfonsoristorato:jpa-spec-kotlin-dsl-hibernate:<version>")
}
dependencies {
implementation 'io.github.alfonsoristorato:jpa-spec-kotlin-dsl:<version>'
implementation 'io.github.alfonsoristorato:jpa-spec-kotlin-dsl-hibernate:<version>'
}
<dependency>
<groupId>io.github.alfonsoristorato</groupId>
<artifactId>jpa-spec-kotlin-dsl</artifactId>
<version>version</version>
</dependency>
<dependency>
<groupId>io.github.alfonsoristorato</groupId>
<artifactId>jpa-spec-kotlin-dsl-hibernate</artifactId>
<version>version</version>
</dependency>
Full documentation including examples, installation instructions, and API reference: https://alfonsoristorato.github.io/jpa-spec-kotlin-dsl/
The API reference (KDoc) is at: https://alfonsoristorato.github.io/jpa-spec-kotlin-dsl/api/
This project is licensed under the MIT License - see the LICENSE file for details.
JPA Specification and PredicateSpecification.Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub alfonsoristorato/jpa-spec-kotlin-dsl --plugin jpa-spec-kotlin-dsl-skillsPlugins from other owners that cover similar ground