Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a21dafe9b84d22ce

Jump to content

Ebean

From Wikipedia, the free encyclopedia
Ebean
DeveloperAvaje
Stable release
13.25.1 / November 22, 2023; 2 years ago (2023-11-22)[1]
Written inJava
Operating systemCross-platform
PlatformJava
Size1.9 MB (archived)
TypeObject-relational mapping
LicenseApache License 2.0
Websiteebean-orm.github.io Edit this on Wikidata
Repository

Ebean is an object–relational mapping product written in Java. It is designed to be simpler to use and understand than JPA (Java Persistence API) or JDO (Java Data Objects) products.

Simple API

[edit]

Ebean has a simpler API than JPA. It achieves this through its 'Session Less' architecture. Ebean does not require a JPA EntityManager or JDO PersistenceManager and this removes the concepts of detached/attached beans and the issues associated with flushing/clearing and 'session management' of EntityManagers. This adds up to make Ebean's API much easier to learn, understand and use.

Relational features

[edit]

Although Ebean has full ORM features (equivalent to JPA) it also has incorporated 'SQL/Relational' features. The idea being that many development efforts require control over the exact sql, calling stored procedures or are more simply solved with 'Relational' approaches. The ultimate goal for Ebean is to combine the best ORM features from JPA with the best 'Relational' features from products like MyBatis into a single persistence framework.

Object–relational mapping

[edit]

Ebean uses the same mapping as JPA with its @Entity, @Table, @OneToMany etc. annotations and xml. The mapping of Entity beans should be compatible between Ebean and JPA.

Going beyond JPA Ebean supports Java Generics and fetching "Partial" objects with its Query object.

Examples

[edit]
// find customer by id
Customer customer = Ebean.find(Customer.class, 1);

//Saving the changes of the customer object
customer.save();

// more complex query with joins
List<Order> order =
   Ebean.find(Order.class)
    .fetch("customer")
    .fetch("customer.billingAddress")
    .fetch("customer.shippingAddress")
    .fetch("details")
    .fetch("details.product", "name")
    .where().eq("shipDate", today)
    .findList();

See also

[edit]

References

[edit]
  1. "Releases · ebean-orm/ebean". github.com. Retrieved 2024-01-11.
[edit]