Skip to content

v2.0.0 #127

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

Merged
merged 37 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
dc7774e
Update dependency org.apache.maven.plugins:maven-pmd-plugin to v3.24.0
xdev-renovate Jul 14, 2024
33122d4
Update dependency org.apache.maven.plugins:maven-project-info-reports…
xdev-renovate Jul 15, 2024
1959ce0
Merge pull request #82 from xdev-software/renovate/org.apache.maven.p…
AB-xdev Jul 17, 2024
db4fd11
Merge pull request #81 from xdev-software/renovate/org.apache.maven.p…
AB-xdev Jul 17, 2024
aca0e64
Also skip tests on test deploy
AB-xdev Jul 18, 2024
e4c7132
Cleaned up demo pom
JohannesRabauer Jul 18, 2024
049bdcd
Merge pull request #119 from xdev-software/master
AB-xdev Jul 18, 2024
21ae9f1
Merge branch 'develop' of https://github.com/xdev-software/spring-dat…
JohannesRabauer Jul 18, 2024
99f469b
Add release failure docs
AB-xdev Jul 18, 2024
8de8501
Merge pull request #83 from xdev-software/release-failure-docs
AB-xdev Jul 18, 2024
24d9ce1
Ignore Ncss Count as it does the same as Checkstyle
AB-xdev Jul 19, 2024
0828d5c
Merge branch 'master' into update-from-template-merged
xdev-gh-bot Jul 20, 2024
bca25e9
Update dependency org.apache.maven.plugins:maven-site-plugin to v4.0.…
xdev-renovate Jul 21, 2024
e69d5c8
Update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3…
xdev-renovate Jul 21, 2024
38062f4
Merge branch 'develop' into update-from-template-merged
xdev-gh-bot Jul 22, 2024
f5cf81b
Added new tests for transactions with version
JohannesRabauer Jul 22, 2024
4251371
Merge pull request #122 from xdev-software/renovate/org.apache.maven.…
JohannesRabauer Jul 22, 2024
99a0774
Merge pull request #121 from xdev-software/renovate/org.apache.maven.…
JohannesRabauer Jul 22, 2024
425143e
Try to fix test-error for duplicated entries in set
JohannesRabauer Jul 22, 2024
e30431e
Added test for immutable findAll result
JohannesRabauer Jul 22, 2024
94843e4
Update org.springframework.boot.version to v3.3.2
xdev-renovate Jul 23, 2024
fe66423
Update org.eclipse.serializer.version to v1.4.0
xdev-renovate Jul 23, 2024
f3d7cfa
Update org.eclipse.store.version to v1.4.0
xdev-renovate Jul 23, 2024
c7cef27
Optimized find by id
JohannesRabauer Jul 24, 2024
4b094b9
Implemented Auto migration from older SDES versions
JohannesRabauer Jul 25, 2024
4992d5b
Fixed checkstyle
JohannesRabauer Jul 25, 2024
261e34a
Fix for empty Versions
JohannesRabauer Jul 25, 2024
8ca29ae
Fix SonarClound-Warnings
JohannesRabauer Jul 25, 2024
c60526a
Merge pull request #126 from xdev-software/optimize-find-by-id
JohannesRabauer Jul 25, 2024
baec34b
Merge pull request #125 from xdev-software/renovate/org.eclipse.store…
JohannesRabauer Jul 25, 2024
95f84fa
Merge branch 'develop' into renovate/org.eclipse.serializer.version
JohannesRabauer Jul 25, 2024
664989a
Merge pull request #124 from xdev-software/renovate/org.eclipse.seria…
JohannesRabauer Jul 25, 2024
69e6651
Merge branch 'develop' into renovate/org.springframework.boot.version
JohannesRabauer Jul 25, 2024
625fa35
Merge pull request #120 from xdev-software/renovate/org.springframewo…
JohannesRabauer Jul 25, 2024
4710ecb
Updated README and CHANGELOG
JohannesRabauer Jul 25, 2024
b79b302
Fix for bulk saving multiple auto id entitites
JohannesRabauer Jul 25, 2024
eb0e2ac
Fix some odd id saveall Behavior
JohannesRabauer Jul 26, 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
3 changes: 3 additions & 0 deletions .config/pmd/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@
<!-- Prohibits singleton pattern -->
<exclude name="MutableStaticState"/>

<!-- Checks LoC, already handled by Checkstyle -->
<exclude name="NcssCount"/>

<!-- Some override methods or Junit require this -->
<exclude name="SignatureDeclareThrowsException"/>

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}

- name: Publish to OSSRH
run: ../mvnw -B deploy -Possrh
run: ../mvnw -B deploy -Possrh -DskipTests
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
env:
MAVEN_CENTRAL_USERNAME: ${{ secrets.S01_OSS_SONATYPE_MAVEN_USERNAME }}
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# 2.0.0

* Restructured root to improve performance with IDs in entities
* Implemented auto migration for older version (<2.0.0).
Added [XDEV MicroMigration](https://github.com/xdev-software/micro-migration) as dependency.
* Updated EclipseStore version to 1.4.0
* Updated Spring to version 3.3.2

# 1.0.10

* Optimistic locking with @Version now possible
Expand Down
28 changes: 28 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,31 @@ If the ``develop`` is ready for release, create a pull request to the ``master``

When the release is finished do the following:
* Merge the auto-generated PR (with the incremented version number) back into the ``develop``

### Release failures

There are 2 modes of release failure:
1. The remote server was e.g. down and non of the artifacts got published
2. There was a build failure during release and only parts of the artifacts got released

In case 1 we can re-release the existing version,<br/>in case 2 we have to release a new version when we can't get the artifacts deleted (as is the case with Maven Central)

#### How-to: Re-Releasing an existing version

1. Delete the release on GitHub
2. Delete the release Git tag from the repo (locally and remote!)
3. Delete the ``master``-Branch and re-create it from the ``develop`` branch (or reset it to the state before the release-workflow commits have been done)
* This requires __temporarily__ removing the branch protection
* Once this was done a new release is triggered immediately!

#### How-to: Releasing a new version

1. Merge the ``master`` branch back into ``develop`` (or another temporary branch)
2. Make sure all master branch versions are prepared for a new release<br/>e.g. if the broken release was ``1.0.0`` the version should now be at ``1.0.1-SNAPSHOT`` - the ``SNAPSHOT`` is important for the workflow!
3. Mark the broken release as broken e.g. inside the Changelog, GitHub Release page, etc.<br/>
You can use something like this:
```
> [!WARNING]
> This release is broken as my cat accidentally clicked the abort button during the process
```
4. Merge the changes back into the ``master`` branch to trigger a new release
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ instructions** are in the documentation](https://xdev-software.github.io/spring-
| ``<= 1.0.2`` | ``17`` | ``3.2.2`` | ``1.1.0`` |
| ``1.0.3/1.0.4`` | ``17`` | ``3.2.3`` | ``1.2.0`` |
| ``1.0.5-1.0.7`` | ``17`` | ``3.2.5`` | ``1.3.2`` |
| ``>= 1.0.8`` | ``17`` | ``3.3.1`` | ``1.3.2`` |
| ``1.0.8-1.0.10`` | ``17`` | ``3.3.1`` | ``1.3.2`` |
| ``>= 2.0.0`` | ``17`` | ``3.3.2`` | ``1.4.0`` |

## Demo

Expand Down
6 changes: 3 additions & 3 deletions docs/antora.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: ROOT
title: Spring-Data-Eclipse-Store
version: master
display_version: '1.0.10'
display_version: '2.0.0'
start_page: index.adoc
nav:
- modules/ROOT/nav.adoc
asciidoc:
attributes:
product-name: 'Spring-Data-Eclipse-Store'
display-version: '1.0.10'
maven-version: '1.0.10'
display-version: '2.0.0'
maven-version: '2.0.0'
page-editable: false
page-out-of-support: false
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>software.xdev</groupId>
<artifactId>spring-data-eclipse-store-root</artifactId>
<version>1.0.11-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
<packaging>pom</packaging>

<organization>
Expand Down
6 changes: 3 additions & 3 deletions spring-data-eclipse-store-benchmark/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<parent>
<groupId>software.xdev</groupId>
<artifactId>spring-data-eclipse-store-root</artifactId>
<version>1.0.11-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<artifactId>spring-data-eclipse-store-benchmark</artifactId>
<version>1.0.11-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
<packaging>jar</packaging>

<inceptionYear>2023</inceptionYear>
Expand All @@ -25,7 +25,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<org.springframework.boot.version>3.3.1</org.springframework.boot.version>
<org.springframework.boot.version>3.3.2</org.springframework.boot.version>
<jmh.version>1.37</jmh.version>
</properties>

Expand Down
18 changes: 4 additions & 14 deletions spring-data-eclipse-store-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
<parent>
<groupId>software.xdev</groupId>
<artifactId>spring-data-eclipse-store-root</artifactId>
<version>1.0.11-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<artifactId>spring-data-eclipse-store-demo</artifactId>
<version>1.0.11-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
<packaging>jar</packaging>

<organization>
Expand All @@ -28,7 +28,7 @@

<mainClass>software.xdev.spring.data.eclipse.store.demo.complex.ComplexDemoApplication</mainClass>

<org.springframework.boot.version>3.3.1</org.springframework.boot.version>
<org.springframework.boot.version>3.3.2</org.springframework.boot.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -64,16 +64,6 @@
</dependency>


<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
Expand All @@ -82,13 +72,13 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>spring-boot-starter-logging</artifactId>
<groupId>org.springframework.boot</groupId>
</exclusion>
</exclusions>
<scope>test</scope>
</dependency>
</dependencies>

Expand Down
6 changes: 3 additions & 3 deletions spring-data-eclipse-store-jpa/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
<parent>
<groupId>software.xdev</groupId>
<artifactId>spring-data-eclipse-store-root</artifactId>
<version>1.0.11-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<artifactId>spring-data-eclipse-store-jpa</artifactId>
<version>1.0.11-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
<packaging>jar</packaging>

<inceptionYear>2023</inceptionYear>
Expand All @@ -30,7 +30,7 @@

<mainClass>software.xdev.spring.data.eclipse.store.demo.complex.ComplexDemoApplication</mainClass>

<org.springframework.boot.version>3.3.1</org.springframework.boot.version>
<org.springframework.boot.version>3.3.2</org.springframework.boot.version>
</properties>

<dependencyManagement>
Expand Down
28 changes: 22 additions & 6 deletions spring-data-eclipse-store/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>software.xdev</groupId>
<artifactId>spring-data-eclipse-store</artifactId>
<version>1.0.11-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>spring-data-eclipse-store</name>
Expand Down Expand Up @@ -50,9 +50,9 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<!-- Should be in sync with org.eclipse.store:integrations-spring-boot3 -->
<org.springframework.boot.version>3.3.1</org.springframework.boot.version>
<org.eclipse.store.version>1.3.2</org.eclipse.store.version>
<org.eclipse.serializer.version>1.3.2</org.eclipse.serializer.version>
<org.springframework.boot.version>3.3.2</org.springframework.boot.version>
<org.eclipse.store.version>1.4.0</org.eclipse.store.version>
<org.eclipse.serializer.version>1.4.0</org.eclipse.serializer.version>
</properties>

<repositories>
Expand Down Expand Up @@ -148,6 +148,22 @@
<version>${org.eclipse.serializer.version}</version>
</dependency>

<dependency>
<groupId>software.xdev</groupId>
<artifactId>micro-migration</artifactId>
<version>2.0.0</version>
<exclusions>
<exclusion>
<artifactId>storage-embedded</artifactId>
<groupId>org.eclipse.store</groupId>
</exclusion>
<exclusion>
<artifactId>storage-embedded-configuration</artifactId>
<groupId>org.eclipse.store</groupId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
Expand Down Expand Up @@ -197,7 +213,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>4.0.0-M15</version>
<version>4.0.0-M16</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -251,7 +267,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.7.0</version>
<version>3.8.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

public interface EntityListProvider
{
<T> EntityProvider<T> getEntityProvider(final Class<T> clazz);
<T, ID> EntityProvider<T, ID> getEntityProvider(final Class<T> clazz);

<T> long getEntityCount(final Class<T> clazz);
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,27 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import software.xdev.spring.data.eclipse.store.repository.root.EntityData;

public class EntityProvider<T>

@SuppressWarnings("java:S119")
public class EntityProvider<T, ID>
{
private final List<IdentitySet<? extends T>> identitySets = new ArrayList<>();
private final List<EntityData<? extends T, ID>> entityDataList = new ArrayList<>();

public void addIdentitySet(final IdentitySet<? extends T> identitySet)
public void addEntityData(final EntityData<? extends T, ID> entityData)
{
this.identitySets.add(identitySet);
this.entityDataList.add(entityData);
}

public Stream<? extends T> stream()
{
return this.identitySets.stream().flatMap(Set::stream);
return this.entityDataList.stream().map(EntityData::getEntities).flatMap(Set::stream);
}

public Collection<T> toCollection()
Expand All @@ -51,4 +55,13 @@ public long size()
{
return this.stream().count();
}

public Optional<T> findAnyEntityWithId(final ID id)
{
return (Optional<T>)this.entityDataList
.stream()
.map(entityData -> entityData.getEntitiesById().get(id))
.filter(e -> e != null)
.findAny();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright © 2024 XDEV Software (https://xdev.software)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file 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.
*/
package software.xdev.spring.data.eclipse.store.exceptions;

public class InvalidRootException extends RuntimeException
{
public InvalidRootException(final String message)
{
super(message);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
import software.xdev.spring.data.eclipse.store.repository.SupportedChecker;
import software.xdev.spring.data.eclipse.store.repository.config.EclipseStoreClientConfiguration;
import software.xdev.spring.data.eclipse.store.repository.support.SimpleEclipseStoreRepository;
import software.xdev.spring.data.eclipse.store.repository.support.copier.id.IdManager;
import software.xdev.spring.data.eclipse.store.repository.support.copier.working.RecursiveWorkingCopier;
import software.xdev.spring.data.eclipse.store.repository.support.id.IdManager;
import software.xdev.spring.data.eclipse.store.transactions.EclipseStoreTransactionManager;


Expand Down
Loading