Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance specification #170

Merged
merged 80 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
ee96155
chore: upgrade asciidoc maven plugin
otaviojava Feb 12, 2024
2c16d27
docs: enhance documentation to column and document
otaviojava Feb 12, 2024
475a0e6
docs: update docs at API
otaviojava Feb 12, 2024
7c8ea6c
docs: update and move project team
otaviojava Feb 12, 2024
7e9ec0b
docs: define documentation to entity
otaviojava Feb 12, 2024
4c17d76
docs: update entity at jnosql
otaviojava Feb 12, 2024
6b764b5
docs: update UUID
otaviojava Feb 16, 2024
ea66201
chore: update maven plugin version 3.0.0
otaviojava Feb 16, 2024
47e7cdd
docs: formating issue
otaviojava Feb 16, 2024
c6d1649
docs: update programming model for entity classes
otaviojava Feb 16, 2024
be07009
docs: enhance entity
otaviojava Feb 16, 2024
a3c360d
docs: update annotation documentation
otaviojava Feb 16, 2024
92ab76d
docs: update and describe an introduction of annotations
otaviojava Feb 16, 2024
7d78b9d
docs update nosql structure
otaviojava Feb 16, 2024
bf9f77d
docs: include links at entity
otaviojava Feb 16, 2024
fd76f95
docs: describe the annotations and convention at entity
otaviojava Feb 16, 2024
45b7c87
docs: update association by field
otaviojava Feb 16, 2024
bc2bb1d
docs: create an ID annotation documentation
otaviojava Feb 16, 2024
0dbc7d0
docs: update definition and structure
otaviojava Feb 16, 2024
0fd4d1a
docs: include embeddable annotation
otaviojava Feb 16, 2024
76df537
docs: update documentation explaning more about serialization to colu…
otaviojava Feb 16, 2024
1f1c577
docs: update intro do annotations
otaviojava Feb 18, 2024
5c0f98c
docs: update annotation
otaviojava Feb 18, 2024
e83d68c
docs: create convert annotation
otaviojava Feb 18, 2024
45a21d7
docs: include mapped class at the annotation
otaviojava Feb 18, 2024
6241b42
docs: create Inheritance section
otaviojava Feb 18, 2024
346da77
docs: Abstract Entity Classes at def
otaviojava Feb 18, 2024
db7b3a9
docs: refine and create Inheritance annotation
otaviojava Feb 18, 2024
4bc84b4
docs: refine and create Inheritance annotation
otaviojava Feb 18, 2024
3c1c919
docs: create json structure to descriminator vlaue
otaviojava Feb 18, 2024
d8511d7
docs: update conventions section
otaviojava Feb 19, 2024
921c4e4
docs: include sample at the template interface
otaviojava Feb 19, 2024
fd2c1d6
docs: create the sampel to the annotations
otaviojava Feb 19, 2024
2020d57
docs: create jakarta ee spec about data
otaviojava Feb 19, 2024
e438a93
chore: update asciidoc version to 2.3.13
otaviojava Feb 19, 2024
e9b6519
docs: enhance documentation to Column annotation
otaviojava Feb 19, 2024
f20902b
docs: update documentation NoSQLException
otaviojava Feb 19, 2024
a636002
feat: create documentation to template interface
otaviojava Feb 19, 2024
f5a2331
docs: ehance documentation at query mapper
otaviojava Feb 19, 2024
72bf68d
feat: create embeddable interface
otaviojava Feb 19, 2024
5171889
feat: create MappedSuperClass
otaviojava Feb 19, 2024
96ce9bd
docs: include a warning about key-value databases
otaviojava Feb 19, 2024
bfedc15
docs: update entity annotation
otaviojava Feb 19, 2024
416ab60
docs: update inheritance annotation
otaviojava Feb 19, 2024
17778c5
docs: create discriminator column
otaviojava Feb 19, 2024
4ec4d4d
docs: create discriminaotr value
otaviojava Feb 19, 2024
7053b57
docs: create convert and attribute converter
otaviojava Feb 19, 2024
8781a6d
docs: create and enhance documentation to attribute converter
otaviojava Feb 19, 2024
19f5b6e
feat: simplity structure to a single project core
otaviojava Feb 19, 2024
a706eef
feat: follow the jakarta data format
otaviojava Feb 19, 2024
58e62bb
chore: update nosql spec structure
otaviojava Feb 19, 2024
760bfa3
docs: update readme file
otaviojava Feb 19, 2024
61ab6f0
docs: update readme section removing duplicated
otaviojava Feb 20, 2024
c909859
docs: update readme
otaviojava Feb 20, 2024
d9b7daa
docs: update javadoc at template
otaviojava Feb 20, 2024
5fae3f7
docs: update id annotation
otaviojava Feb 20, 2024
e87d983
docs: update javadoc
otaviojava Feb 20, 2024
bc79423
docs: include annotation
otaviojava Feb 20, 2024
8b57e90
Update api/pom.xml
otaviojava Feb 20, 2024
0ca3439
Update api/src/main/java/jakarta/nosql/AttributeConverter.java
otaviojava Feb 20, 2024
2fa1e6e
Update api/src/main/java/jakarta/nosql/Id.java
otaviojava Feb 20, 2024
ad98aa8
Update README.adoc
otaviojava Feb 20, 2024
3d1db4a
Update spec/src/main/asciidoc/chapters/api/annotations.adoc
otaviojava Feb 20, 2024
34bddb3
Update spec/src/main/asciidoc/chapters/api/annotations.adoc
otaviojava Feb 20, 2024
6415747
Update spec/src/main/asciidoc/chapters/api/annotations.adoc
otaviojava Feb 20, 2024
138d460
Update spec/src/main/asciidoc/chapters/api/annotations.adoc
otaviojava Feb 20, 2024
4c81d6b
Update spec/src/main/asciidoc/chapters/api/entity.adoc
otaviojava Feb 20, 2024
dc7f1ee
Update README.adoc
otaviojava Feb 20, 2024
fbd5228
Update api/src/main/java/jakarta/nosql/Template.java
otaviojava Feb 20, 2024
36c5548
Update api/src/main/java/jakarta/nosql/Template.java
otaviojava Feb 20, 2024
d5b0275
Update api/src/main/java/jakarta/nosql/Template.java
otaviojava Feb 20, 2024
26e8ce8
Update api/src/main/java/jakarta/nosql/Template.java
otaviojava Feb 20, 2024
c0b1f2d
Update api/src/main/java/jakarta/nosql/Template.java
otaviojava Feb 20, 2024
9de4cc9
docs: update id annotation
otaviojava Feb 21, 2024
08ebe51
feat: include more expression about the TTL in NoSQL atabase
otaviojava Feb 21, 2024
02f4fbf
feat: include parameter
otaviojava Feb 21, 2024
93cbc47
Update api/src/main/java/jakarta/nosql/Template.java
otaviojava Feb 21, 2024
3b8f964
docs: enhance template documentation
otaviojava Feb 21, 2024
6b6a277
Update api/src/main/java/jakarta/nosql/Template.java
otaviojava Feb 21, 2024
652835a
Update api/src/main/java/jakarta/nosql/package-info.java
otaviojava Feb 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
149 changes: 19 additions & 130 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@ image::jakarta_ee_logo_schooner_color_stacked_default.png[Jakarta NoSQL logo,ali

== Introduction

Jakarta NoSQL is a Java framework that streamlines the integration of Java applications with NoSQL databases.
Jakarta NoSQL is a comprehensive framework designed to simplify the integration of Java applications with various NoSQL databases. By providing a unified API and a set of powerful annotations, Jakarta NoSQL enables developers to seamlessly work with different NoSQL data stores while maintaining flexibility and productivity.

== Goals

* Increase productivity performing common NoSQL operations.
* Rich Object Mapping integrated.
* Java-based Query and Fluent-API.
* Specific templates API to NoSQL key-value, document, wide-column types.
* It is designed to work with various NoSQL databases and can quickly adapt to support new types and behaviors through extensions.
* Annotation-oriented using JPA-like naming when it makes sense
* Annotation-oriented using Jakarta Persistence-like naming when it makes sense

== One Mapping API to Multiples NoSQL Databases

Expand All @@ -39,26 +38,27 @@ public class Car {

=== Annotations

The annotations from the Mapping API annotations will look familiar to the Jakarta Persistence/JPA developer:
The annotations from the Mapping API will look familiar to Jakarta Persistence developers:

[cols="Annotation description"]
[cols="2"]
|===
|Annotation|Description

|@Entity
|Specifies that the class is an entity. This annotation is applied to the entity class.

|@Id
|Specifies the primary key of an entity.

|@Column
|Specify the mapped column for a persistent property or field.

| Annotation | Description
| `@Entity` | Specifies that the class is an entity. This annotation is applied to the entity class.
| `@Id` | Specifies the primary key of an entity.
| `@Column` | Specifies the mapped column for a persistent property or field.
| `@MappedSuperclass` | Specifies a class whose mapping information is applied to entities that inherit from it.
| `@Embeddable` | Declares a class whose instances are stored as an intrinsic part of an owning entity, sharing the identity of the entity.
| `@Inheritance` | Specifies the inheritance mapping strategy for the entity class hierarchy.
| `@DiscriminatorColumn` | Specifies the discriminator column for the mapping strategy.
| `@DiscriminatorValue` | Specifies the value of the discriminator column for the annotated entity type.
| `@Convert` | Specifies how the values of a field or property are converted to a basic type or a type that can be persisted by a persistence provider.
|===

These annotations provide a powerful toolkit for defining and mapping entities in NoSQL databases, analogous to their counterparts in Jakarta Persistence.

=== Template

After mapping an entity, you can explore the advantage of using a ```Template``` interface, which can increase productivity on NoSQL operations.
After mapping an entity, you can explore the advantage of using a `Template` interface, which can increase productivity on NoSQL operations.

[source,java]
----
Expand All @@ -75,126 +75,15 @@ Optional<Car> car = template.find(Car.class, 1L);
template.delete(Car.class, 1L);
----

This template has specialization to take the benefits of a particular NoSQL database type.

*Maven dependency*

[source,xml]
----
<dependency>
<groupId>jakarta.nosql</groupId>
<artifactId>nosql-core</artifactId>
<version>1.0.0-b7</version>
</dependency>
----

=== Key-Value

Jakarta NoSQL provides a Key-Value template to explore the specific behavior of this NoSQL type.

[source,java]
----
@Inject
KeyValueTemplate template;
...

Car ferrari = Car.id(1L)
.name("ferrari")
.city("Rome")
.type(CarType.SPORT);

template.put(ferrari);
Optional<Car> car = template.get(1L, Car.class);
template.delete(1L);
----

Key-Value is database agnostic. Thus, you can change the database in your application with no or minimal impact on source code.

*Maven dependency*

[source,xml]
----
<dependency>
<groupId>jakarta.nosql</groupId>
<artifactId>nosql-key-value</artifactId>
<version>1.0.0-b7</version>
</dependency>
----


=== Column Family

Jakarta NoSQL provides a Column Family template to explore the specific behavior of this NoSQL type.

[source,java]
----
@Inject
ColumnTemplate template;
...

Car ferrari = Car.id(1L)
.name("ferrari")
.city("Rome")
.type(CarType.SPORT);

template.insert(ferrari);
Optional<Car> car = template.find(Car.class, 1L);

List<Car> cars = template.select(Car.class).where("city").eq("Rome").result();

template.delete(Car.class).where("id").eq(1L).execute();

Optional<Car> result = template.singleResult("select * from Car where id = 1");
----

Column Family is database agnostic. Thus, you can change the database in your application with no or minimal impact on source code.

*Maven dependency*

[source,xml]
----
<dependency>
<groupId>jakarta.nosql</groupId>
<artifactId>nosql-column</artifactId>
<version>1.0.0-b7</version>
</dependency>
----


=== Document

Jakarta NoSQL provides a Document template to explore the specific behavior of this NoSQL type.

[source,java]
----
@Inject
DocumentTemplate template;
...

Car ferrari = Car.id(1L)
.name("ferrari")
.city("Rome")
.type(CarType.SPORT);

template.insert(ferrari);
Optional<Car> car = template.find(Car.class, 1L);

List<Car> cars = template.select(Car.class).where("city").eq("Rome").result();

template.delete(Car.class).where("id").eq(1L).execute();

Optional<Car> result = template.singleResult("select * from Car where id = 1");
----

Document is database agnostic. Thus, you can change the database in your application with no or minimal impact on source code.
The `Template` interface provides specialized methods to leverage the features of specific NoSQL database types.

*Maven dependency*

[source,xml]
----
<dependency>
<groupId>jakarta.nosql</groupId>
<artifactId>nosql-document</artifactId>
<artifactId>jakarta.nosql-api</artifactId>
<version>1.0.0-b7</version>
</dependency>
----
Expand Down
15 changes: 0 additions & 15 deletions api/nosql-column/.gitignore

This file was deleted.

37 changes: 0 additions & 37 deletions api/nosql-column/pom.xml

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading