Skip to content

v1.0.1 #18

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 22 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
8e0d92b
Merge pull request #13 from xdev-software/master
JohannesRabauer Jan 25, 2024
a7acd91
Bump com.puppycrawl.tools:checkstyle from 10.12.7 to 10.13.0
dependabot[bot] Jan 29, 2024
530a543
Bump com.puppycrawl.tools:checkstyle from 10.12.7 to 10.13.0
dependabot[bot] Jan 29, 2024
76ec03f
Added mainClass and JVM Args to pom for Demo
JohannesRabauer Jan 29, 2024
1963aa7
Test and fix for cold initialisation with ids
JohannesRabauer Jan 29, 2024
08ca3e1
Update CHANGELOG.md
JohannesRabauer Jan 29, 2024
a382734
Update RecursiveWorkingCopier.java
JohannesRabauer Jan 30, 2024
4f8693a
Removed unused import
JohannesRabauer Feb 1, 2024
0319c65
Ensure Root before checking persistence
JohannesRabauer Feb 1, 2024
2cb1abb
CheckBuild Action now checks Java 21.0.1 and not the not working vers…
JohannesRabauer Feb 1, 2024
608d9cd
Merge pull request #23 from xdev-software/dependabot/maven/com.puppyc…
AB-xdev Feb 2, 2024
75dce51
Added JPA module
JohannesRabauer Feb 2, 2024
b190a7a
Added EclipseStoreRepository-Interfaces and tests for it
JohannesRabauer Feb 5, 2024
7610828
JPA Demo application running
JohannesRabauer Feb 5, 2024
2759473
Cleanup
JohannesRabauer Feb 5, 2024
9c78e0f
JPA Demo working
JohannesRabauer Feb 5, 2024
d40dfdd
Adjusted docs
JohannesRabauer Feb 5, 2024
bf19c5d
Refactor JPA-Demo with writing to H2
JohannesRabauer Feb 5, 2024
4e7b481
Merge pull request #17 from xdev-software/jpa-demo-test
JohannesRabauer Feb 5, 2024
a27b853
Merge branch 'develop' into update-from-template
JohannesRabauer Feb 5, 2024
8aa8c6d
Merge pull request #14 from xdev-software/dependabot/maven/com.puppyc…
JohannesRabauer Feb 5, 2024
1d6aeee
Merge pull request #16 from xdev-software/update-from-template
JohannesRabauer Feb 5, 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
2 changes: 1 addition & 1 deletion .github/workflows/checkBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

strategy:
matrix:
java: [17, 21]
java: [17, 21.0.1]
distribution: [temurin]

steps:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ target/

# EclipseStore
storage
storage-jpa

# == IntelliJ ==
*.iml
Expand Down
16 changes: 16 additions & 0 deletions .run/Run JPA Demo.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run JPA Demo" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" value="software.xdev.spring.data.eclipse.store.jpa.JpaDemoApplication" />
<module name="spring-data-eclipse-store-jpa" />
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="software.xdev.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
# 1.0.1

* Fix for NullPointerException when storing an entity with Auto-ID and no previous action on the database.
* Provide multiple Repository Interfaces, not only EclipseStoreRepository (e.g. EclipseStoreCrudRepository).

# 1.0.0

* Initial release

9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,12 @@ After adding the library in your dependencies, using it is as easy as adding the

## Demo

To see how easy it is to implement EclipseStore in your Spring project, take a look at the two
To see how easy it is to implement EclipseStore in your Spring project, take a look at the three
[demos](./spring-data-eclipse-store-demo):<br/>
A [simple](./spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/simple)
and a
more [complex demo](./spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex).
A [simple](./spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/simple), a
more [complex demo](./spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex)
and
a [demo with coexisting JPA](./spring-data-eclipse-store-jpa/src/main/java/software/xdev/spring/data/eclipse/store/jpa).

> [!NOTE]
> Since the library is using reflection to copy data, the following JVM-Arguments may have to be set:
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<module>spring-data-eclipse-store</module>
<module>spring-data-eclipse-store-demo</module>
<module>spring-data-eclipse-store-benchmark</module>
<module>spring-data-eclipse-store-jpa</module>
</modules>

<licenses>
Expand Down
2 changes: 1 addition & 1 deletion spring-data-eclipse-store-benchmark/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>10.12.7</version>
<version>10.13.0</version>
</dependency>
</dependencies>
<configuration>
Expand Down
11 changes: 9 additions & 2 deletions spring-data-eclipse-store-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

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

<org.springframework.boot.version>3.2.2</org.springframework.boot.version>
</properties>
Expand Down Expand Up @@ -80,6 +80,13 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${org.springframework.boot.version}</version>
<configuration>
<mainClass>${mainClass}</mainClass>
<jvmArguments>
--add-opens java.base/java.util=ALL-UNNAMED
--add-opens java.base/java.time=ALL-UNNAMED
</jvmArguments>
</configuration>
</plugin>
</plugins>
</build>
Expand All @@ -96,7 +103,7 @@
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>10.12.7</version>
<version>10.13.0</version>
</dependency>
</dependencies>
<configuration>
Expand Down
144 changes: 144 additions & 0 deletions spring-data-eclipse-store-jpa/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

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

<inceptionYear>2023</inceptionYear>

<organization>
<name>XDEV Software</name>
<url>https://xdev.software</url>
</organization>

<properties>
<javaVersion>17</javaVersion>
<maven.compiler.release>${javaVersion}</maven.compiler.release>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

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

<org.springframework.boot.version>3.2.2</org.springframework.boot.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${org.springframework.boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
<dependency>
<groupId>software.xdev</groupId>
<artifactId>spring-data-eclipse-store</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<finalName>${project.artifactId}</finalName>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.12.1</version>
<configuration>
<release>${maven.compiler.release}</release>
<compilerArgs>
<arg>-proc:none</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${org.springframework.boot.version}</version>
<configuration>
<mainClass>${mainClass}</mainClass>
<jvmArguments>
--add-opens java.base/java.util=ALL-UNNAMED
--add-opens java.base/java.time=ALL-UNNAMED
</jvmArguments>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>checkstyle</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.3.1</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>10.12.7</version>
</dependency>
</dependencies>
<configuration>
<configLocation>../.config/checkstyle/checkstyle.xml</configLocation>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package software.xdev.spring.data.eclipse.store.jpa;

import jakarta.persistence.Id;


public class CustomerInEclipseStore
{
@Id
private String id;

private String firstName;
private String lastName;

public CustomerInEclipseStore(final String id, final String firstName, final String lastName)
{
this.id = id;
this.firstName = firstName;
this.lastName = lastName;
}

public CustomerInEclipseStore()
{

}

@Override
public String toString()
{
return String.format(
"Customer[id=%s, firstName='%s', lastName='%s']",
this.id, this.firstName, this.lastName);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package software.xdev.spring.data.eclipse.store.jpa;

import software.xdev.spring.data.eclipse.store.repository.interfaces.EclipseStoreCrudRepository;


/**
* To be able to properly coexist with JPA in one project, the repositories must be declared as specific JPA- or
* EclipseStore-Repositories.
*/
public interface CustomerInEclipseStoreRepository extends EclipseStoreCrudRepository<CustomerInEclipseStore, String>
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package software.xdev.spring.data.eclipse.store.jpa;

import jakarta.persistence.Entity;
import jakarta.persistence.Id;


@Entity
public class CustomerInJpa
{
@Id
private String id;

private String firstName;
private String lastName;

public CustomerInJpa(final String id, final String firstName, final String lastName)
{
this.id = id;
this.firstName = firstName;
this.lastName = lastName;
}

public CustomerInJpa()
{

}

@Override
public String toString()
{
return String.format(
"Customer[id=%s, firstName='%s', lastName='%s']",
this.id, this.firstName, this.lastName);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package software.xdev.spring.data.eclipse.store.jpa;

import org.springframework.data.jpa.repository.JpaRepository;


/**
* To be able to properly coexist with JPA in one project, the repositories must be declared as specific JPA- or
* EclipseStore-Repositories.
*/
public interface CustomerInJpaRepository extends JpaRepository<CustomerInJpa, String>
{
}
Loading