Exhaustive Mansart reference. For onboarding, see Getting started. For everyday patterns, see Usage.
Maven artefacts
| Artefact | Role |
|---|---|
|
Annotations ( |
|
Runtime: |
|
APT — static metamodel + |
|
Dialect SPI ( |
|
H2 dialect (test reference + embedded). |
|
PostgreSQL dialect (production target). |
|
CDI 4.1 bootstrap — Vauban-compatible BCE that discovers |
|
Pool public API: |
|
|
|
|
|
Jakarta Persistence 3.2 implementation. |
JPMS modules
| Module | Exports |
|---|---|
|
|
|
|
|
|
|
TBD. |
All modules are JPMS-strict — minimal exports, no unjustified opens, no classpath.
Entity annotations
| Mansart (zero-dep) | JPA equivalent recognized |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
same |
|
same (owning relations only in v1) |
|
|
|
|
APT rule: if @jakarta.persistence.Entity is present → JPA annotations. Otherwise, @io.vidocq.mansart.data.Entity → Mansart annotations. Both at once → explicit compile-time error.
Out of scope v1: @OneToMany, @ManyToMany, @MappedSuperclass, @Inheritance, @Convert/AttributeConverter. Deferred to mansart-persistence (M7).
Repository annotations
| Annotation | Usage |
|---|---|
|
On the interface — triggers APT generation. |
|
Finder method by typed parameters (Java parameter = entity attribute). |
|
JDQL — SELECT/UPDATE/DELETE with named parameters ( |
|
Lifecycle annotations — parameter = entity, collection or varargs; return |
|
Static order on a finder. |
|
Overrides the |
Transaction annotations
| Annotation | Usage |
|---|---|
|
CDI interceptor. TxType: |
|
CDI scope whose lifetime matches the transaction. |
PoolConfig configuration
| Property | Type | Description |
|---|---|---|
|
|
Full JDBC URL. |
|
|
DB login. |
|
|
Password. |
|
|
Pre-warmed minimum connections (default 0). |
|
|
Hard pool bound (default 10). |
|
|
Timeout on |
|
|
Eviction of an idle connection (default 10 min). |
|
|
Eviction of an old connection (default 30 min). |
|
|
|
|
|
SQL when |
|
|
Leak stack-trace if a connection is borrowed longer than the threshold. |
|
|
SQL run on first |
Pluggable dialects
| Dialect | Status | Notes |
|---|---|---|
H2 |
✅ Delivered |
Test reference + embedded. |
PostgreSQL |
⏳ M4 |
Production target. |
MariaDB / MySQL |
❌ Backlog |
— |
SQL Server |
❌ Backlog |
— |
Oracle |
❌ Backlog |
— |
SQLite |
❌ Backlog |
— |
Discovered via ServiceLoader (provides DialectFactory with H2DialectFactory).
Compatibility
-
Java 25 (LTS), Maven 3.9.16.
-
Jakarta Data 1.0 (delivered), Jakarta Persistence 3.2 (M7 pending), Jakarta Transactions 2.0.
-
CDI 4.1 Lite via Vauban.
-
Virtual Threads for any JDBC execution.
See also
-
lien:https://codeberg.org/Vidocq/mansart/src/branch/main/PLAN.md[Mansart PLAN.md] — global vision and work order.
-
lien:https://codeberg.org/Vidocq/mansart/src/branch/main/mansart-jakarta-data/PLAN.md[mansart-jakarta-data PLAN.md] — detailed plan of the Data module.
-
lien:https://codeberg.org/Vidocq/mansart/src/branch/main/mansart-pool/PLAN.md[mansart-pool PLAN.md] — pool design.
-
lien:https://codeberg.org/Vidocq/mansart/src/branch/main/mansart-transactions/PLAN.md[mansart-transactions PLAN.md] — transactions roadmap.