Databases 5 min read

Jakarta NoSQL 1.0: A New Standard for NoSQL Integration in the Java Ecosystem

Jakarta NoSQL 1.0 introduces a standardized, annotation‑driven API that lets Java developers map objects to document, key‑value, column‑family, or graph databases with type‑safe CRUD and fluent queries, while supporting CDI, annotation processors, and IDE integration for higher productivity and portability.

JakartaEE China Community
JakartaEE China Community
JakartaEE China Community
Jakarta NoSQL 1.0: A New Standard for NoSQL Integration in the Java Ecosystem

Announcement

Jakarta NoSQL 1.0 final release provides a new specification that standardizes NoSQL integration in the Java ecosystem, aiming for higher productivity and portability across document, key‑value, column‑family, and graph databases.

Why Jakarta NoSQL?

The specification enables developers to use NoSQL databases while fully adhering to the Jakarta EE programming model. Its advantages include:

Improved productivity for everyday NoSQL operations

Rich object‑mapping between Java classes and NoSQL documents/records

Fluent expression query API based on Java

Flexible architecture supporting multiple NoSQL types and behaviors

Annotation‑driven development similar to Jakarta Persistence, offering a familiar experience

Familiar Annotations and Model

Jakarta NoSQL follows a convention‑over‑configuration approach and provides annotations compatible with the Jakarta Persistence (JPA) model. Common annotations include:

@Entity – defines a persistent entity class

@Id – marks the primary key of an entity

@Column – maps a field to a database column

@MappedSuperclass – shares mapping definitions among subclasses

@Embeddable – defines an embeddable value object

@Inheritance, @DiscriminatorColumn, @DiscriminatorValue – support inheritance strategies

@Convert – handles type conversion during persistence

A quick example:

@Entity
public class Car {
  @Id
  private Long id;
  @Column
  private String name;
  @Column
  private CarType type;
}

The specification deliberately omits relationship annotations such as @OneToMany or @ManyToOne because most NoSQL databases lack such relational features, but it leaves extension points for vendors.

Core Interface: Template – Bridging Java and NoSQL

The central API is the Template interface, which offers type‑safe CRUD operations and fluent queries that connect annotated entities with NoSQL stores.

@Inject
Template template;

// Insert data
Car ferrari = Car.id(1L).name("Ferrari").type(CarType.SPORT);
template.insert(ferrari);

// Query data
Optional<Car> car = template.find(Car.class, 1L);
template.delete(Car.class, 1L);

Beyond basic persistence, the fluent‑style query API enables more advanced operations:

List<Car> cars = template.select(Car.class)
    .where("type").eq(CarType.SUV)
    .orderBy("name").asc()
    .result();

template.delete(Car.class)
    .where("type").eq(CarType.COUPE)
    .execute();

This API provides strong type safety and allows vendors to extend the interface with native capabilities.

Tooling Support and Implementation

The reference implementation Eclipse JNoSQL supports:

Full CDI and CDI Lite integration

Java annotation processor to avoid runtime reflection

IntelliJ IDEA integration that highlights persistent fields and entities in real time

Conclusion

Jakarta NoSQL is more than a data‑access API; it offers a future‑ready, extensible, and portable data layer for Java developers building microservices, event‑driven applications, and cloud‑native systems.

Learn more at https://jakarta.ee/specifications/nosql/1.0/.

JavaTemplateNoSQLAnnotation APIEclipse JNoSQLJakarta NoSQL
JakartaEE China Community
Written by

JakartaEE China Community

JakartaEE China Community, official website: jakarta.ee/zh/community/china; gitee.com/jakarta-ee-china; space.bilibili.com/518946941; reply "Join group" to get QR code

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.