Features
Built for Modern Java Persistence
Litebridge balances relational power with the simplicity of plain Java objects.
Transparent Mapping
Use traditional annotated entities, or map DTOs to databases without modifying domain classes.
Fluent API
Compose queries using a natural, SQL-like fluent builder that feels like writing SQL in Java.
Lightweight
A pure Java library with minimal external dependencies, keeping projects lean.
Efficient
Focuses on performance and minimising database round-trips via built-in DTO change tracking.
Spring Integration
Seamlessly integrate with Spring Boot applications using the dedicated starter module.
Maven Plugin
Reverse engineer database schemas and generate type-safe metamodels for compile-time safety.
Code Examples
SQL-Like, Minimal Magic
Litebridge treats SQL as a first-class citizen while keeping your Java code clean.
// Register a Litebridge entity
litebridge.register(PersonEntity.class);
// Or register any DTO programmatically
litebridge.register(Person.class, rc -> rc.mapToTable("LB.PERSON")
.with(spec -> spec.mapField("id").toColumn("PERSON_ID")
.generateUsingSequence("LB.PERSON_SEQ"))
.with(spec -> spec.mapField("name").toColumn("FIRST_NAME"))
.with(spec -> spec.mapField("accounts")
.oneToMany(c -> c.mappedByField("owner"))));