Taymyr: DDD Repository API

DDD Repository pattern for Lagom/Play frameworks

License

License

Categories

Categories

Java Languages
GroupId

GroupId

org.taymyr.play
ArtifactId

ArtifactId

play-repository-api-java
Last Version

Last Version

0.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

Taymyr: DDD Repository API
DDD Repository pattern for Lagom/Play frameworks
Project Organization

Project Organization

Digital Economy League

Download play-repository-api-java

How to add to project

<!-- https://jarcasting.com/artifacts/org.taymyr.play/play-repository-api-java/ -->
<dependency>
    <groupId>org.taymyr.play</groupId>
    <artifactId>play-repository-api-java</artifactId>
    <version>0.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.taymyr.play/play-repository-api-java/
implementation 'org.taymyr.play:play-repository-api-java:0.0.1'
// https://jarcasting.com/artifacts/org.taymyr.play/play-repository-api-java/
implementation ("org.taymyr.play:play-repository-api-java:0.0.1")
'org.taymyr.play:play-repository-api-java:jar:0.0.1'
<dependency org="org.taymyr.play" name="play-repository-api-java" rev="0.0.1">
  <artifact name="play-repository-api-java" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.taymyr.play', module='play-repository-api-java', version='0.0.1')
)
libraryDependencies += "org.taymyr.play" % "play-repository-api-java" % "0.0.1"
[org.taymyr.play/play-repository-api-java "0.0.1"]

Dependencies

compile (1)

Group / Artifact Type Version
org.jetbrains.kotlin : kotlin-stdlib-jdk8 jar 1.2.71

provided (1)

Group / Artifact Type Version
com.typesafe.play : play-java_2.12 jar 2.6.0

Project Modules

There are no modules declared in this project.

Gitter Gitter_RU Build Status Javadocs Javadocs codecov Maven

DDD Repository pattern for Lagom/Play

API of library contains only one interface Repository for DDD aggregate, inspired the book Implementing Domain-Driven Design by Vaughn Vernon.

Example

JPA

Create the interface of repository for aggregate

public interface AggregateRepository extends Repository<Aggregate, UUID> { }

and implement it

public class AggregateRepositoryImpl extends JPARepository<Aggregate, UUID> implements AggregateRepository {

    @Inject
    public AggregateRepositoryImpl(@Nonnull JPAApi jpaApi, @Nonnull DatabaseExecutionContext executionContext) {
        super(jpaApi, executionContext, Aggregate.class);
    }

    @Override
    public UUID nextIdentity() {
        return UUID.randomUUID();
    }
}

Contributors

Other persistence implementations (for MongoDB/Cassandra/Redis) are welcome.

License

Copyright © Digital Economy League (https://www.digitalleague.ru/).

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

org.taymyr.play

Taymyr

Microservices business platform

Versions

Version
0.0.1