Package com.codename1.orm.session
package com.codename1.orm.session
Managed persistence contexts and queries for the client and backend ORMs.
Open a Session with the runtime's EntityManager.openSession() method.
A session maintains entity identity, detects changes, and loads relationships
using metadata generated at build time. Writes require an active transaction;
closing a session rolls back an active transaction and detaches its entities.
Sessions are not thread-safe. Initialize associations needed by the UI before
detaching entities, and perform client database access off the event thread.
Use Query for builder queries or JpqlQuery for the documented JPQL subset.
Models and relationship field access are generated and enhanced at build time.
-
ClassDescriptionAttributeConverter<T,
S> Reflection-free conversion between a domain value and one SQL scalar.Immutable composite identity, in the model's declared identifier-field order.JpqlQuery<T>A mutable query obtained fromSession.createQuery(String, Class).An unloaded association was accessed after its session was detached or closed.Explicit row-lock modes.The row was changed or removed since it was loaded.An ORM failure, including an underlying database failure during lazy access.Query<T>A mutable, parameterized query obtained fromSession.query(Class).A persistence context obtained from an entity manager'sopenSession()method.