Taymyr: DDD Repository

DDD Repository pattern for Lagom/Play frameworks

License

License

GroupId

GroupId

org.taymyr.play
ArtifactId

ArtifactId

play-repository-api-java_2.13
Last Version

Last Version

0.1.0
Release Date

Release Date

Type

Type

pom.sha512
Description

Description

Taymyr: DDD Repository
DDD Repository pattern for Lagom/Play frameworks
Project URL

Project URL

https://taymyr.org
Project Organization

Project Organization

Digital Economy League
Source Code Management

Source Code Management

https://github.com/taymyr/play-repository-java

Download play-repository-api-java_2.13

Dependencies

runtime (1)

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

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.1.0