org.jnosql.artemis:artemis-validation

Eclipse JNoSQL Mapping, Artemis API, that offers support to bean validation

License

License

GroupId

GroupId

org.jnosql.artemis
ArtifactId

ArtifactId

artemis-validation
Last Version

Last Version

0.0.9
Release Date

Release Date

Type

Type

jar
Description

Description

org.jnosql.artemis:artemis-validation
Eclipse JNoSQL Mapping, Artemis API, that offers support to bean validation
Project URL

Project URL

http://jnosql.org/
Source Code Management

Source Code Management

https://github.com/eclipse/jnosql-artemis

Download artemis-validation

How to add to project

<!-- https://jarcasting.com/artifacts/org.jnosql.artemis/artemis-validation/ -->
<dependency>
    <groupId>org.jnosql.artemis</groupId>
    <artifactId>artemis-validation</artifactId>
    <version>0.0.9</version>
</dependency>
// https://jarcasting.com/artifacts/org.jnosql.artemis/artemis-validation/
implementation 'org.jnosql.artemis:artemis-validation:0.0.9'
// https://jarcasting.com/artifacts/org.jnosql.artemis/artemis-validation/
implementation ("org.jnosql.artemis:artemis-validation:0.0.9")
'org.jnosql.artemis:artemis-validation:jar:0.0.9'
<dependency org="org.jnosql.artemis" name="artemis-validation" rev="0.0.9">
  <artifact name="artemis-validation" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.jnosql.artemis', module='artemis-validation', version='0.0.9')
)
libraryDependencies += "org.jnosql.artemis" % "artemis-validation" % "0.0.9"
[org.jnosql.artemis/artemis-validation "0.0.9"]

Dependencies

provided (6)

Group / Artifact Type Version
javax.validation : validation-api jar 2.0.1.Final
org.jnosql.artemis : artemis-core jar 0.0.9
javax.json : javax.json-api jar 1.1.4
javax.json.bind : javax.json.bind-api jar 1.0
javax.annotation : javax.annotation-api jar 1.3.2
javax.enterprise : cdi-api jar 2.0.SP1

test (13)

Group / Artifact Type Version
org.jnosql.artemis : artemis-column jar 0.0.9
org.jnosql.artemis : artemis-document jar 0.0.9
org.jnosql.artemis : artemis-key-value jar 0.0.9
org.hibernate : hibernate-validator jar 5.4.0.Final
org.glassfish.web : el-impl jar 2.2.1-b05
org.eclipse : yasson jar 1.0.3
org.glassfish : javax.json jar 1.1.4
org.junit.jupiter : junit-jupiter-engine jar 5.5.0-M1
org.junit.jupiter : junit-jupiter-params jar 5.5.0-M1
org.hamcrest : hamcrest-all jar 1.3
org.mockito : mockito-core jar 2.27.0
org.mockito : mockito-junit-jupiter jar 2.27.0
org.awaitility : awaitility jar 3.1.6

Project Modules

There are no modules declared in this project.

Per https://bugs.eclipse.org/bugs/show_bug.cgi?id=544301 This repo has been archived.

Eclipse JNoSQL Artemis Project

Eclipse JNoSQL Artemis

Eclipse JNoSQL Artemis is a flexible and extensible OxM to connect NoSQL databases. It brings an easy interface to support key-value, column family, document oriented and graph databases using as base Diana in CDI based.

  • CDI Based
  • Diana Based
  • Events to insert, delete, update
  • Supports to Bean Validation
  • OxM Annotation Based
  • Configurable and extensible

The API's focus is on simplicity and ease of use. Developers should only have to know a minimal set of artifacts to work with the solution. The API is built on latest Java 8 features and therefore fit perfectly with the functional features of Java 8.

The project has five modules:

  • *The artemis-core: The Eclipse JNoSQL mapping, Artemis, commons project.
  • The artemis-configuration: The Eclipse JNoSQL reader to Artemis project.
  • The artemis-column: The Eclipse JNoSQL mapping, Artemis, to column NoSQL database.
  • The artemis-document: The Eclipse JNoSQL mapping, Artemis, to document NoSQL database.
  • The artemis-key-value: The Eclipse JNoSQL mapping, Artemis, to key-value NoSQL database.
  • The artemis-validation: The Eclipse JNoSQL mapping, Artemis, that offers support to Bean Validation

The graph API is an extension because the communication layer to the graph is Apache TinkerPop.

Eclipse JNoSQL Artemis Core

The Eclipse JNoSQL Artemis Core is the commons project in the mapping project. It has the commons annotations.

Entities Mapping

  • @Entity: Specifies that the class is an entity. This annotation is applied to the entity class.
  • @Column: Specifies a mapped column for a persistent property or field.
  • @Id: Defines the field is the key of the Entity
  • @Embeddable:Defines a class whose instances are stored as an intrinsic part of an owning entity and share the identity of the entity.
  • @MappedSuperclass: Designates a class whose mapping information is applied to the entities that inherit from it. A mapped superclass has no separate table defined for it.
  • @Convert This annotation enables the converter resource.

E.g.:

@Entity
public class Person {

    @Id
    private long id;

    @Column
    private String name;

    @Column
    private int age;

    @Column
    private List<String> phones;
}    

Convert annotation

public class MoneyConverter implements AttributeConverter<Money, String>{

    @Override
    public String convertToDatabaseColumn(Money attribute) {
        return attribute.toString();
    }

    @Override
    public Money convertToEntityAttribute(String dbData) {
        return Money.parse(dbData);
    }
}

@Entity
public class Worker {

    @Column
    private String name;

    @Column
    private Job job;

    @Column("money")
    @Convert(MoneyConverter.class)//converts to String on the database
    private Money salary;
}

@ConfigurationUnit

Expresses a dependency to a configuration and its associated persistence unit.

@ConfigurationUnit
private ColumnFamilyManagerFactory<DatabaseImplementation> factory;
   
@ConfigurationUnit(fileName = "column.json", name = "name")
private ColumnFamilyManagerFactory<?> factoryB;
    

@Database

The database qualifier used on Eclipse JNoSQL Artemis such as defines which interpreter will be used on Repository.

public interface PersonRepository extends Repository<Person, Long> {
}


    @Inject
    @Database(value = DatabaseType.COLUMN)
    private PersonRepository repository;

    @Inject
    @Database(value = DatabaseType.DOCUMENT)
    private PersonRepository repository;

    @Inject
    @Database(value = DatabaseType.KEY_VALUE)
    private PersonRepository repository;        
    
org.jnosql.artemis

Eclipse Foundation

Versions

Version
0.0.9
0.0.8
0.0.7
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2