From 098356449ae249e2387c76cbe40047562fe0806a Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 23 Jan 2024 10:00:44 +0100 Subject: [PATCH 01/40] Rename --- .../pom.xml | 0 {standard-maven-template => spring-data-eclipse-store}/pom.xml | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename {standard-maven-template-demo => spring-data-eclipse-store-demo}/pom.xml (100%) rename {standard-maven-template => spring-data-eclipse-store}/pom.xml (100%) diff --git a/standard-maven-template-demo/pom.xml b/spring-data-eclipse-store-demo/pom.xml similarity index 100% rename from standard-maven-template-demo/pom.xml rename to spring-data-eclipse-store-demo/pom.xml diff --git a/standard-maven-template/pom.xml b/spring-data-eclipse-store/pom.xml similarity index 100% rename from standard-maven-template/pom.xml rename to spring-data-eclipse-store/pom.xml From 7042fcf774fa4e497bd554f396ac45e450211519 Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 23 Jan 2024 10:02:46 +0100 Subject: [PATCH 02/40] Rename --- .run/Run Demo.run.xml | 4 ++-- CONTRIBUTING.md | 4 ++-- README.md | 12 ++++++------ SECURITY.md | 2 +- pom.xml | 6 +++--- spring-data-eclipse-store-demo/pom.xml | 4 ++-- spring-data-eclipse-store/pom.xml | 12 ++++++------ 7 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.run/Run Demo.run.xml b/.run/Run Demo.run.xml index 764b3b9c..8777eeeb 100644 --- a/.run/Run Demo.run.xml +++ b/.run/Run Demo.run.xml @@ -1,7 +1,7 @@ - \ No newline at end of file + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2f8dd900..0a21eee9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -33,10 +33,10 @@ You should have the following things installed: * Ensure that the JDK/Java-Version is correct -## Releasing [![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/standard-maven-template/release.yml?branch=master)](https://github.com/xdev-software/standard-maven-template/actions/workflows/release.yml) +## Releasing [![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/spring-data-eclipse-store/release.yml?branch=master)](https://github.com/xdev-software/spring-data-eclipse-store/actions/workflows/release.yml) Before releasing: -* Consider doing a [test-deployment](https://github.com/xdev-software/standard-maven-template/actions/workflows/test-deploy.yml?query=branch%3Adevelop) before actually releasing. +* Consider doing a [test-deployment](https://github.com/xdev-software/spring-data-eclipse-store/actions/workflows/test-deploy.yml?query=branch%3Adevelop) before actually releasing. * Check the [changelog](CHANGELOG.md) If the ``develop`` is ready for release, create a pull request to the ``master``-Branch and merge the changes diff --git a/README.md b/README.md index b90c3ebd..6285dc87 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ -[![Latest version](https://img.shields.io/maven-central/v/software.xdev/standard-maven-template?logo=apache%20maven)](https://mvnrepository.com/artifact/software.xdev/standard-maven-template) -[![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/standard-maven-template/checkBuild.yml?branch=develop)](https://github.com/xdev-software/standard-maven-template/actions/workflows/checkBuild.yml?query=branch%3Adevelop) -[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=xdev-software_standard-maven-template&metric=alert_status)](https://sonarcloud.io/dashboard?id=xdev-software_standard-maven-template) +[![Latest version](https://img.shields.io/maven-central/v/software.xdev/spring-data-eclipse-store?logo=apache%20maven)](https://mvnrepository.com/artifact/software.xdev/spring-data-eclipse-store) +[![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/spring-data-eclipse-store/checkBuild.yml?branch=develop)](https://github.com/xdev-software/spring-data-eclipse-store/actions/workflows/checkBuild.yml?query=branch%3Adevelop) +[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=xdev-software_spring-data-eclipse-store&metric=alert_status)](https://sonarcloud.io/dashboard?id=xdev-software_spring-data-eclipse-store) -# standard-maven-template +# spring-data-eclipse-store ## Installation -[Installation guide for the latest release](https://github.com/xdev-software/standard-maven-template/releases/latest#Installation) +[Installation guide for the latest release](https://github.com/xdev-software/spring-data-eclipse-store/releases/latest#Installation) ## Support @@ -16,4 +16,4 @@ If you need support as soon as possible and you can't wait for any pull request, See the [contributing guide](./CONTRIBUTING.md) for detailed instructions on how to get started with our project. ## Dependencies and Licenses -View the [license of the current project](LICENSE) or the [summary including all dependencies](https://xdev-software.github.io/standard-maven-template/dependencies/) +View the [license of the current project](LICENSE) or the [summary including all dependencies](https://xdev-software.github.io/spring-data-eclipse-store/dependencies/) diff --git a/SECURITY.md b/SECURITY.md index 92188f39..62a55c57 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,4 +2,4 @@ ## Reporting a Vulnerability -Please report a security vulnerability [on GitHub Security Advisories](https://github.com/xdev-software/standard-maven-template/security/advisories/new). +Please report a security vulnerability [on GitHub Security Advisories](https://github.com/xdev-software/spring-data-eclipse-store/security/advisories/new). diff --git a/pom.xml b/pom.xml index 4e48f7a6..310781ec 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 software.xdev - standard-maven-template-root + spring-data-eclipse-store-root 1.0.0-SNAPSHOT pom @@ -15,8 +15,8 @@ - standard-maven-template - standard-maven-template-demo + spring-data-eclipse-store + spring-data-eclipse-store-demo diff --git a/spring-data-eclipse-store-demo/pom.xml b/spring-data-eclipse-store-demo/pom.xml index c6123331..2cbc6e5b 100644 --- a/spring-data-eclipse-store-demo/pom.xml +++ b/spring-data-eclipse-store-demo/pom.xml @@ -5,7 +5,7 @@ 4.0.0 software.xdev - standard-maven-template-demo + spring-data-eclipse-store-demo 1.0.0-SNAPSHOT jar @@ -29,7 +29,7 @@ software.xdev - standard-maven-template + spring-data-eclipse-store ${project.version} diff --git a/spring-data-eclipse-store/pom.xml b/spring-data-eclipse-store/pom.xml index 6b141317..5259321e 100644 --- a/spring-data-eclipse-store/pom.xml +++ b/spring-data-eclipse-store/pom.xml @@ -5,17 +5,17 @@ 4.0.0 software.xdev - standard-maven-template + spring-data-eclipse-store 1.0.0-SNAPSHOT jar - standard-maven-template - standard-maven-template - https://github.com/xdev-software/standard-maven-template + spring-data-eclipse-store + spring-data-eclipse-store + https://github.com/xdev-software/spring-data-eclipse-store - https://github.com/xdev-software/standard-maven-template - https://github.com/xdev-software/standard-maven-template.git + https://github.com/xdev-software/spring-data-eclipse-store + https://github.com/xdev-software/spring-data-eclipse-store.git 2023 From 3f96b82834fe7fce592754b31bbafb38dcc43014 Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 23 Jan 2024 10:15:39 +0100 Subject: [PATCH 03/40] Create markdown files and Readme Co-Authored-By: Johannes Rabauer <8188460+JohannesRabauer@users.noreply.github.com> --- CHANGELOG.md | 2 ++ README.md | 74 +++++++++++++++++++++++++++++++++++++++ assets/Logo.png | Bin 0 -> 46257 bytes assets/WorkingCopy_1.png | Bin 0 -> 42293 bytes assets/WorkingCopy_2.png | Bin 0 -> 64344 bytes 5 files changed, 76 insertions(+) create mode 100644 assets/Logo.png create mode 100644 assets/WorkingCopy_1.png create mode 100644 assets/WorkingCopy_2.png diff --git a/CHANGELOG.md b/CHANGELOG.md index e69de29b..3c257c34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -0,0 +1,2 @@ +# 1.0.0 +* Initial release diff --git a/README.md b/README.md index 6285dc87..89097fa0 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,86 @@ [![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/spring-data-eclipse-store/checkBuild.yml?branch=develop)](https://github.com/xdev-software/spring-data-eclipse-store/actions/workflows/checkBuild.yml?query=branch%3Adevelop) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=xdev-software_spring-data-eclipse-store&metric=alert_status)](https://sonarcloud.io/dashboard?id=xdev-software_spring-data-eclipse-store) +
+ XDEV Spring-Data Eclipse-Store Logo +
+ # spring-data-eclipse-store +A library to simplify using [EclipseStore](https://eclipsestore.io/) in the [Spring environment](https://spring.io/projects/spring-data/). + +What makes this library special is, that it creates a working copy of the data. +This way EclipseStore behaves almost exactly like relational database from a coding perspective. + +## Features + +The library provides following features: + +* Enforces the + **[Spring data repository concept](https://docs.spring.io/spring-data/jpa/reference/repositories/core-concepts.html)** + for EclipseStore by using [working copies](#working-copies) +* **[Drop in compatible](#usage)** for your existing Spring application +* Utilizes **ultra-fast EclipseStore serializing and storing** +* Enables your application to **select + any [EclipseStore target](https://docs.eclipsestore.io/manual/storage/storage-targets/index.html)** (f.e. + [PostgreSQL](https://docs.eclipsestore.io/manual/storage/storage-targets/sql-databases/postgresql.html), + [AWS S3](https://docs.eclipsestore.io/manual/storage/storage-targets/blob-stores/aws-s3.html) or + [IBM COS](https://github.com/xdev-software/eclipse-store-afs-ibm-cos)) +* Can save up to **99%[^1] of monthly costs** in the IBM Cloud and up to 82%[^2] in the AWS Cloud + +[^1]:If the COS Connector is used in the IBM Cloud instead of a PostgreSQL and approx. 10,000 entries with a total size +of 1 +GB of data are stored. ([IBM Cloud Pricing](https://cloud.ibm.com/estimator/estimates), as of 08.01.2024) + +[^2]: If the S3 connector is used instead of DynamoDB under the same conditions at +AWS. ([AWS Pricing Calculator](https://calculator.aws/#/estimate?id=ab85cddf77f0d1aa0457111ed82785dfb836b1d8), as of +08.01.2024) + +### Working copies + +If you use EclipseStore without our library, EclipseStore loads the data from the datastore directly into memory. You make your changes on these loaded Java objects and by calling ``store`` EclipseStore writes it directly from memory to the datastore. + +![Native behavior of EclipseStore](assets/WorkingCopy_1.png) + +If you e.g. change the address of a person, the changed address is already in your data model, **even before storing** this person. +This is very different from the behavior a Spring user expects. + +With *Spring-Data-Eclipse-Store* every time an object is loaded from the datastore, a working copy of that object (or rather the object tree) is created and returned to the user. Therefore, the user can make the changes on the working copy without any changes to the actual data model. The changes are only persisted after calling ``save`` on a repository. + +![Behavior of EclipseStore with Spring-Data-Eclipse-Store](assets/WorkingCopy_2.png) ## Installation [Installation guide for the latest release](https://github.com/xdev-software/spring-data-eclipse-store/releases/latest#Installation) +### Prerequisites + +| | Minimal Version | +|--------------|-----------| +| Java | ``17`` | +| Spring Data | ``3.2.1`` | +| EclipseStore | ``1.1.0`` | + +### Usage + +After adding the library in your dependencies, using it is as easy as adding the ``@EnableEclipseStoreRepositories`` annotation to your ``@SpringBootApplication`` annotation. + +## Demo + +To see how easy it is to implement EclipseStore in your Spring project, take a look at the two +[demos](./spring-data-eclipse-store-demo): +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). + +> [!NOTE] +> Since the library is using reflection to copy data, the following JVM-Arguments may have to be set: +> ``` +> --add-opens=java.base/java.lang=ALL-UNNAMED +> --add-opens=java.base/java.lang.reflect=ALL-UNNAMED +> --add-opens=java.base/java.util=ALL-UNNAMED +> --add-opens=java.base/java.time=ALL-UNNAMED +> ``` + ## Support If you need support as soon as possible and you can't wait for any pull request, feel free to use [our support](https://xdev.software/en/services/support). diff --git a/assets/Logo.png b/assets/Logo.png new file mode 100644 index 0000000000000000000000000000000000000000..f6d42013a30c11d56b0f2deebcbb7649b48c4918 GIT binary patch literal 46257 zcmeFZ1z45cwm-T65hWBAP(VUJ>F$;eX;^efEV{c5?w#ZUN~AX_W467VAIp z+k1a|fA^gGzx%o8JU5=>qX_SsbG&1YIckpi8+=fZlfXhJK!-peSW=RrN)QOL6$FBE z_s(tbL=hiJ9Q@bruA=U!r0+s%Yj0z0W(gy8bhCw#!d%UaArRLoD+Q~2ZKQYLyVTCN zZsplNy(}@}{IMVS?$z|s^VUaucfTxNx@D`O8OznHP-~(;QP(KJe_&g#&${;&1%~!< z?RoOcx3@(woK`r)e+dk@@_iQIH0+U*tduO6@GJF*P6$6m8RgyZy#EaAnXvp4wkf^1 zV(#jLag-u#!Cb8UoKfP~2+6a8aPCiMe8PWIhm_$FGd{Q|1 zge}6`I9MZ5V%ysX0zvXO6A@965)t|Pg1|Boy&`xe+Z1pD5LxD8H23fx*nL+>+FC%d zql41D^B-0<9cx+2Vl*8N|5D9`UWAH95)4IqY@$P?jViQ<^lNM3%Np79|gW zg4Z6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Sd}z_1f3Tr8j+&CC69@JVe%_~)?lq?^RV5!cf_-v}q6qnk zThgaUdi>Z@SstLvgNBAkc$78x=gvXyRyi#+*84XYA0@ZA5&tI$I7(pPx2nLI?N_rZ zHztlrXS2FuMMSy2v{Cwd*30di%c*b1?NBM~)&=u(U3AQsAH}E#EbZCA=GD2u0G>)Y zdS8xA*MWxkUkW6?SET{h;O1gZ0^e{I0fcWg(CYyRf8h}StMVg33@|hzHm>Z;kXS4c zRi4z`)^Uk)mtOZhAm(#*m)8H+BTIv_7j7JS%FAu=m&}6@2L0b{7~KN?Go7>K=D+;y m-=fvOSEK&$|Jw9V(JJ^M>oe;>kjc7oMOI2lvgnb~tN#O@U>ddn literal 0 HcmV?d00001 From 59758ffd60f0eb35366254854e3db1e321e38796 Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 23 Jan 2024 10:20:07 +0100 Subject: [PATCH 04/40] Update README.md Co-Authored-By: Johannes Rabauer <8188460+JohannesRabauer@users.noreply.github.com> --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 89097fa0..1d1e7e0a 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=xdev-software_spring-data-eclipse-store&metric=alert_status)](https://sonarcloud.io/dashboard?id=xdev-software_spring-data-eclipse-store)
- XDEV Spring-Data Eclipse-Store Logo + XDEV Spring-Data Eclipse-Store Logo
# spring-data-eclipse-store @@ -23,7 +23,7 @@ The library provides following features: * **[Drop in compatible](#usage)** for your existing Spring application * Utilizes **ultra-fast EclipseStore serializing and storing** * Enables your application to **select - any [EclipseStore target](https://docs.eclipsestore.io/manual/storage/storage-targets/index.html)** (f.e. + any [EclipseStore target](https://docs.eclipsestore.io/manual/storage/storage-targets/index.html)** (e.f. [PostgreSQL](https://docs.eclipsestore.io/manual/storage/storage-targets/sql-databases/postgresql.html), [AWS S3](https://docs.eclipsestore.io/manual/storage/storage-targets/blob-stores/aws-s3.html) or [IBM COS](https://github.com/xdev-software/eclipse-store-afs-ibm-cos)) @@ -68,7 +68,7 @@ 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 -[demos](./spring-data-eclipse-store-demo): +[demos](./spring-data-eclipse-store-demo):
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). From f172f3cc8b04684579300d2100d50a4d6fb3c41a Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 23 Jan 2024 10:35:52 +0100 Subject: [PATCH 05/40] Add initial code Co-Authored-By: Johannes Rabauer <8188460+JohannesRabauer@users.noreply.github.com> Co-Authored-By: Moritz Mitlmeier <99164988+MMitlmeier@users.noreply.github.com> --- spring-data-eclipse-store-demo/pom.xml | 58 +-- .../demo/complex/ComplexDemoApplication.java | 142 +++++++ .../store/demo/complex/model/BaseEntity.java | 49 +++ .../store/demo/complex/model/NamedEntity.java | 37 ++ .../store/demo/complex/model/Person.java | 52 +++ .../store/demo/complex/owner/Owner.java | 96 +++++ .../demo/complex/owner/OwnerRepository.java | 32 ++ .../eclipse/store/demo/complex/owner/Pet.java | 77 ++++ .../store/demo/complex/owner/PetType.java | 24 ++ .../store/demo/complex/owner/Visit.java | 66 +++ .../store/demo/complex/vet/Specialty.java | 24 ++ .../eclipse/store/demo/complex/vet/Vet.java | 66 +++ .../store/demo/complex/vet/VetRepository.java | 31 ++ .../eclipse/store/demo/simple/Customer.java | 27 ++ .../store/demo/simple/CustomerRepository.java | 8 + .../data/eclipse/store/demo/simple/Pet.java | 31 ++ .../store/demo/simple/PetRepository.java | 8 + .../demo/simple/SimpleDemoApplication.java | 69 +++ .../src/main/resources/log4j2.xml | 13 + spring-data-eclipse-store/pom.xml | 149 +++++++ .../store/aot/EclipseStoreRuntimeHints.java | 46 ++ .../data/eclipse/store/core/IdentitySet.java | 142 +++++++ .../AlreadyRegisteredException.java | 24 ++ .../exceptions/DifferentClassesException.java | 24 ++ .../FieldAccessReflectionException.java | 34 ++ .../IdGeneratorNotSupportedException.java | 24 ++ .../exceptions/MergeFailedException.java | 31 ++ .../exceptions/NoIdFieldFoundException.java | 24 ++ .../NoPageableObjectFoundException.java | 24 ++ .../exceptions/NotComparableException.java | 24 ++ .../exceptions/StringBlankException.java | 29 ++ .../repository/EclipseStoreRepository.java | 27 ++ .../store/repository/EclipseStoreStorage.java | 293 +++++++++++++ .../store/repository/EntityListProvider.java | 24 ++ .../store/repository/EntitySetCollector.java | 79 ++++ .../store/repository/IdSetterProvider.java | 24 ++ .../store/repository/PersistableChecker.java | 22 + .../data/eclipse/store/repository/Query.java | 44 ++ .../repository/RelayedPersistenceChecker.java | 36 ++ .../data/eclipse/store/repository/Root.java | 47 +++ .../store/repository/WorkingCopyRegistry.java | 103 +++++ .../store/repository/access/AccessHelper.java | 114 +++++ .../access/modifier/FieldAccessModifier.java | 40 ++ .../FieldAccessModifierToEditable.java | 24 ++ .../access/modifier/FieldAccessibleMaker.java | 78 ++++ .../FieldEditableMakerForJavaLowerThan18.java | 124 ++++++ .../EclipseStoreRepositoriesRegistrar.java | 46 ++ ...StoreRepositoryConfigNamespaceHandler.java | 37 ++ ...StoreRepositoryConfigurationExtension.java | 76 ++++ .../EnableEclipseStoreRepositories.java | 187 +++++++++ .../query/EclipseStoreQueryCreator.java | 264 ++++++++++++ .../FindAllEclipseStoreQueryProvider.java | 90 ++++ .../repository/query/ReflectedField.java | 53 +++ .../StringBasedEclipseStoreQueryProvider.java | 107 +++++ .../query/criteria/AbstractCriteriaNode.java | 197 +++++++++ .../repository/query/criteria/Criteria.java | 43 ++ .../query/criteria/CriteriaAndNode.java | 58 +++ .../query/criteria/CriteriaOrNode.java | 56 +++ .../query/criteria/CriteriaSingleNode.java | 60 +++ .../query/executors/EntitySorter.java | 75 ++++ .../query/executors/ListQueryExecutor.java | 75 ++++ .../executors/PageableQueryExecutor.java | 74 ++++ .../PageableSortableCollectionQuerier.java | 127 ++++++ .../query/executors/QueryExecutor.java | 40 ++ .../query/executors/QueryExecutorCreator.java | 86 ++++ .../SingleOptionalQueryExecutor.java | 88 ++++ .../query/executors/SingleQueryExecutor.java | 56 +++ .../EclipseStoreQueryLookupStrategy.java | 113 +++++ .../EclipseStoreRepositoryFactory.java | 109 +++++ .../EclipseStoreRepositoryFactoryBean.java | 53 +++ .../repository/support/IdFieldFinder.java | 53 +++ .../support/SimpleEclipseStoreRepository.java | 279 +++++++++++++ .../support/copier/DataTypeUtil.java | 70 ++++ .../support/copier/id/IdSetter.java | 66 +++ .../support/copier/id/NotSettingIdSetter.java | 25 ++ .../support/copier/id/SimpleIdSetter.java | 60 +++ .../support/copier/id/strategy/IdFinder.java | 65 +++ .../strategy/auto/AbstractAutoIdFinder.java | 53 +++ .../id/strategy/auto/AutoIntegerIdFinder.java | 37 ++ .../id/strategy/auto/AutoLongIdFinder.java | 48 +++ .../id/strategy/auto/AutoStringIdFinder.java | 49 +++ .../EclipseSerializerRegisteringCopier.java | 190 +++++++++ .../object/RegisteringObjectCopier.java | 24 ++ .../working/ChangedObjectCollector.java | 22 + .../HashSetChangedObjectCollector.java | 65 +++ .../HashSetMergedTargetsCollector.java | 38 ++ .../working/MergedTargetsCollector.java | 23 + .../working/RecursiveWorkingCopier.java | 279 +++++++++++++ .../support/copier/working/WorkingCopier.java | 63 +++ .../copier/working/WorkingCopierCreator.java | 27 ++ .../copier/working/WorkingCopierResult.java | 30 ++ .../reposyncer/RepositorySynchronizer.java | 35 ++ .../SimpleRepositorySynchronizer.java | 87 ++++ .../store/util/GenericObjectComparer.java | 98 +++++ .../data/eclipse/store/util/StringUtil.java | 39 ++ .../main/resources/META-INF/spring.factories | 1 + .../main/resources/META-INF/spring.handlers | 1 + .../resources/META-INF/spring/aot.factories | 5 + .../store/helper/DummyWorkingCopier.java | 55 +++ .../data/eclipse/store/helper/TestData.java | 24 ++ .../data/eclipse/store/helper/TestUtil.java | 64 +++ .../integration/DefaultTestAnnotations.java | 40 ++ .../store/integration/TestConfiguration.java | 57 +++ .../store/integration/repositories/Child.java | 82 ++++ .../repositories/ChildCustomer.java | 37 ++ .../repositories/ChildCustomerRepository.java | 23 + .../integration/repositories/Customer.java | 89 ++++ .../repositories/CustomerNotCrud.java | 62 +++ .../CustomerNotCrudRepository.java | 28 ++ .../repositories/CustomerRepository.java | 45 ++ .../CustomerRepositoryWithHashSet.java | 23 + .../CustomerRepositoryWithQuery.java | 36 ++ .../repositories/CustomerWithChild.java | 104 +++++ .../CustomerWithChildRepository.java | 26 ++ .../repositories/CustomerWithHashSet.java | 99 +++++ .../repositories/CustomerWithQuery.java | 72 ++++ .../store/integration/repositories/Node.java | 68 +++ .../repositories/NodeRepository.java | 23 + .../store/integration/repositories/Owner.java | 87 ++++ .../repositories/OwnerRepository.java | 23 + .../repositories/ParentCustomer.java | 89 ++++ .../ParentCustomerRepository.java | 25 ++ .../integration/repositories/SubCustomer.java | 24 ++ .../repositories/SubCustomerRepository.java | 24 ++ .../repositories/id/CustomerWithIdInt.java | 98 +++++ .../id/CustomerWithIdIntRepository.java | 23 + .../id/CustomerWithIdInteger.java | 98 +++++ .../CustomerWithIdIntegerNoAutoGenerate.java | 96 +++++ ...WithIdIntegerNoAutoGenerateRepository.java | 24 ++ .../id/CustomerWithIdIntegerRepository.java | 23 + .../repositories/id/CustomerWithIdLong.java | 85 ++++ .../id/CustomerWithIdLongRepository.java | 23 + .../repositories/id/CustomerWithIdString.java | 80 ++++ .../id/CustomerWithIdStringRepository.java | 23 + .../repositories/id/CustomerWithPurchase.java | 108 +++++ .../id/CustomerWithPurchaseRepository.java | 23 + .../integration/repositories/id/Purchase.java | 68 +++ .../real/life/example/Article.java | 56 +++ .../real/life/example/ArticleGroup.java | 31 ++ .../real/life/example/Invoice.java | 34 ++ .../real/life/example/InvoiceRepository.java | 23 + .../real/life/example/Position.java | 49 +++ .../real/life/example/PositionRepository.java | 23 + .../real/life/example/Warehouse.java | 41 ++ .../integration/tests/ChangeRootTests.java | 123 ++++++ .../integration/tests/ConcurrencyTest.java | 205 +++++++++ .../store/integration/tests/HashSetTest.java | 98 +++++ .../store/integration/tests/IdTest.java | 392 ++++++++++++++++++ .../integration/tests/InheritanceTest.java | 137 ++++++ .../tests/JpaCompatibilityTest.java | 92 ++++ .../store/integration/tests/QueryTest.java | 381 +++++++++++++++++ .../integration/tests/RealLifeTests.java | 338 +++++++++++++++ .../integration/tests/SimpleMultipleTest.java | 169 ++++++++ .../integration/tests/SimpleSingleTest.java | 202 +++++++++ .../store/integration/tests/StressTest.java | 81 ++++ .../integration/tests/WorkingCopyTests.java | 277 +++++++++++++ .../EclipseStoreQueryCreatorAndOrTest.java | 308 ++++++++++++++ .../EclipseStoreQueryCreatorBooleanTest.java | 83 ++++ ...clipseStoreQueryCreatorCollectionTest.java | 112 +++++ ...lipseStoreQueryCreatorGreaterLessTest.java | 266 ++++++++++++ .../EclipseStoreQueryCreatorIsIsNotTest.java | 201 +++++++++ .../EclipseStoreQueryCreatorStringTest.java | 201 +++++++++ .../repository/query/QueryCreatorUtil.java | 95 +++++ ...PageableSortableCollectionQuerierTest.java | 220 ++++++++++ .../support/copier/DataTypeUtilTest.java | 98 +++++ .../MicroStreamRegisteringCopierTest.java | 136 ++++++ .../src/test/resources/application.properties | 1 + .../src/test/resources/log4j2.xml | 13 + 168 files changed, 13126 insertions(+), 27 deletions(-) create mode 100644 spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/ComplexDemoApplication.java create mode 100644 spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/model/BaseEntity.java create mode 100644 spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/model/NamedEntity.java create mode 100644 spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/model/Person.java create mode 100644 spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/owner/Owner.java create mode 100644 spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/owner/OwnerRepository.java create mode 100644 spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/owner/Pet.java create mode 100644 spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/owner/PetType.java create mode 100644 spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/owner/Visit.java create mode 100644 spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/vet/Specialty.java create mode 100644 spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/vet/Vet.java create mode 100644 spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/vet/VetRepository.java create mode 100644 spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/simple/Customer.java create mode 100644 spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/simple/CustomerRepository.java create mode 100644 spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/simple/Pet.java create mode 100644 spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/simple/PetRepository.java create mode 100644 spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/simple/SimpleDemoApplication.java create mode 100644 spring-data-eclipse-store-demo/src/main/resources/log4j2.xml create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/aot/EclipseStoreRuntimeHints.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/core/IdentitySet.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/AlreadyRegisteredException.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/DifferentClassesException.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/FieldAccessReflectionException.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/IdGeneratorNotSupportedException.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/MergeFailedException.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/NoIdFieldFoundException.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/NoPageableObjectFoundException.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/NotComparableException.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/StringBlankException.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/EclipseStoreRepository.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/EclipseStoreStorage.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/EntityListProvider.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/EntitySetCollector.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/IdSetterProvider.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/PersistableChecker.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/Query.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/RelayedPersistenceChecker.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/Root.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/WorkingCopyRegistry.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/AccessHelper.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldAccessModifier.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldAccessModifierToEditable.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldAccessibleMaker.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldEditableMakerForJavaLowerThan18.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/config/EclipseStoreRepositoriesRegistrar.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/config/EclipseStoreRepositoryConfigNamespaceHandler.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/config/EclipseStoreRepositoryConfigurationExtension.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/config/EnableEclipseStoreRepositories.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/EclipseStoreQueryCreator.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/FindAllEclipseStoreQueryProvider.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/ReflectedField.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/StringBasedEclipseStoreQueryProvider.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/criteria/AbstractCriteriaNode.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/criteria/Criteria.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/criteria/CriteriaAndNode.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/criteria/CriteriaOrNode.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/criteria/CriteriaSingleNode.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/EntitySorter.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/ListQueryExecutor.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/PageableQueryExecutor.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/PageableSortableCollectionQuerier.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/QueryExecutor.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/QueryExecutorCreator.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/SingleOptionalQueryExecutor.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/SingleQueryExecutor.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/EclipseStoreQueryLookupStrategy.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/EclipseStoreRepositoryFactory.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/EclipseStoreRepositoryFactoryBean.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/IdFieldFinder.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/SimpleEclipseStoreRepository.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/DataTypeUtil.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/IdSetter.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/NotSettingIdSetter.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/SimpleIdSetter.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/strategy/IdFinder.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/strategy/auto/AbstractAutoIdFinder.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/strategy/auto/AutoIntegerIdFinder.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/strategy/auto/AutoLongIdFinder.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/strategy/auto/AutoStringIdFinder.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/object/EclipseSerializerRegisteringCopier.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/object/RegisteringObjectCopier.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/ChangedObjectCollector.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/HashSetChangedObjectCollector.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/HashSetMergedTargetsCollector.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/MergedTargetsCollector.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/RecursiveWorkingCopier.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/WorkingCopier.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/WorkingCopierCreator.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/WorkingCopierResult.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/reposyncer/RepositorySynchronizer.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/reposyncer/SimpleRepositorySynchronizer.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/util/GenericObjectComparer.java create mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/util/StringUtil.java create mode 100644 spring-data-eclipse-store/src/main/resources/META-INF/spring.factories create mode 100644 spring-data-eclipse-store/src/main/resources/META-INF/spring.handlers create mode 100644 spring-data-eclipse-store/src/main/resources/META-INF/spring/aot.factories create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/helper/DummyWorkingCopier.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/helper/TestData.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/helper/TestUtil.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/DefaultTestAnnotations.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/TestConfiguration.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/Child.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/ChildCustomer.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/ChildCustomerRepository.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/Customer.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerNotCrud.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerNotCrudRepository.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerRepository.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerRepositoryWithHashSet.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerRepositoryWithQuery.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithChild.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithChildRepository.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithHashSet.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithQuery.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/Node.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/NodeRepository.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/Owner.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/OwnerRepository.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/ParentCustomer.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/ParentCustomerRepository.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/SubCustomer.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/SubCustomerRepository.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdInt.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdIntRepository.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdInteger.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdIntegerNoAutoGenerate.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdIntegerNoAutoGenerateRepository.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdIntegerRepository.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdLong.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdLongRepository.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdString.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdStringRepository.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithPurchase.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithPurchaseRepository.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/Purchase.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/Article.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/ArticleGroup.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/Invoice.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/InvoiceRepository.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/Position.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/PositionRepository.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/Warehouse.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/ChangeRootTests.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/ConcurrencyTest.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/HashSetTest.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/IdTest.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/InheritanceTest.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/JpaCompatibilityTest.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/QueryTest.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/RealLifeTests.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/SimpleMultipleTest.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/SimpleSingleTest.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/StressTest.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/WorkingCopyTests.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/EclipseStoreQueryCreatorAndOrTest.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/EclipseStoreQueryCreatorBooleanTest.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/EclipseStoreQueryCreatorCollectionTest.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/EclipseStoreQueryCreatorGreaterLessTest.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/EclipseStoreQueryCreatorIsIsNotTest.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/EclipseStoreQueryCreatorStringTest.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/QueryCreatorUtil.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/executors/PageableSortableCollectionQuerierTest.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/support/copier/DataTypeUtilTest.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/support/copier/object/MicroStreamRegisteringCopierTest.java create mode 100644 spring-data-eclipse-store/src/test/resources/application.properties create mode 100644 spring-data-eclipse-store/src/test/resources/log4j2.xml diff --git a/spring-data-eclipse-store-demo/pom.xml b/spring-data-eclipse-store-demo/pom.xml index 2cbc6e5b..721e9f0c 100644 --- a/spring-data-eclipse-store-demo/pom.xml +++ b/spring-data-eclipse-store-demo/pom.xml @@ -9,7 +9,7 @@ 1.0.0-SNAPSHOT jar - 2022 + 2023 XDEV Software @@ -24,14 +24,41 @@ UTF-8 software.xdev.Application + + 3.2.2 + + + + org.springframework.boot + spring-boot-dependencies + ${org.springframework.boot.version} + pom + import + + + + software.xdev spring-data-eclipse-store ${project.version} + + + org.apache.logging.log4j + log4j-core + + + org.apache.logging.log4j + log4j-slf4j2-impl + + + org.springframework.boot + spring-boot-autoconfigure + @@ -50,32 +77,9 @@ - org.apache.maven.plugins - maven-assembly-plugin - 3.6.0 - - - - ${mainClass} - - - true - - - - jar-with-dependencies - - false - - - - make-assembly - package - - single - - - + org.springframework.boot + spring-boot-maven-plugin + ${org.springframework.boot.version} diff --git a/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/ComplexDemoApplication.java b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/ComplexDemoApplication.java new file mode 100644 index 00000000..9b540917 --- /dev/null +++ b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/ComplexDemoApplication.java @@ -0,0 +1,142 @@ +/* + * Copyright 2012-2019 the original author or authors. + * + * 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 + * + * https://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.demo.complex; + +import java.time.LocalDate; +import java.time.temporal.ChronoUnit; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.boot.CommandLineRunner; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.ConfigurableApplicationContext; +import org.springframework.data.domain.Pageable; + +import software.xdev.spring.data.eclipse.store.demo.complex.owner.Owner; +import software.xdev.spring.data.eclipse.store.demo.complex.owner.OwnerRepository; +import software.xdev.spring.data.eclipse.store.demo.complex.owner.Pet; +import software.xdev.spring.data.eclipse.store.demo.complex.owner.PetType; +import software.xdev.spring.data.eclipse.store.demo.complex.owner.Visit; +import software.xdev.spring.data.eclipse.store.demo.complex.vet.Specialty; +import software.xdev.spring.data.eclipse.store.demo.complex.vet.Vet; +import software.xdev.spring.data.eclipse.store.demo.complex.vet.VetRepository; +import software.xdev.spring.data.eclipse.store.repository.config.EnableEclipseStoreRepositories; + + +@SpringBootApplication +@EnableEclipseStoreRepositories +public class ComplexDemoApplication implements CommandLineRunner +{ + private static final Logger LOG = LoggerFactory.getLogger(ComplexDemoApplication.class); + private final OwnerRepository ownerRepository; + private final VetRepository vetRepository; + + public ComplexDemoApplication(final OwnerRepository ownerRepository, final VetRepository vetRepository) + { + this.ownerRepository = ownerRepository; + this.vetRepository = vetRepository; + } + + public static void main(final String[] args) + { + final ConfigurableApplicationContext run = SpringApplication.run(ComplexDemoApplication.class, args); + run.close(); + } + + @Override + public void run(final String... args) + { + LOG.info("----Vets-BeforeDeleteAll----"); + this.vetRepository.findAll().forEach(i -> LOG.info(i.toString())); + this.vetRepository.deleteAll(); + + LOG.info("----Vets-AfterDeleteAll----"); + this.vetRepository.findAll().forEach(i -> LOG.info(i.toString())); + + final Vet vet = createVet(); + this.vetRepository.save(vet); + + LOG.info("----Vets-AfterSave----"); + this.vetRepository.findAll().forEach(i -> LOG.info(i.toString())); + + LOG.info("----Owner-BeforeDeleteAll----"); + this.ownerRepository.findAll(Pageable.unpaged()).forEach(i -> LOG.info(i.toString())); + this.ownerRepository.deleteAll(); + + LOG.info("----Owner-AfterDeleteAll----"); + this.ownerRepository.findAll(Pageable.unpaged()).forEach(i -> LOG.info(i.toString())); + + final Owner owner = createOwner(); + this.ownerRepository.save(owner); + + LOG.info("----Owner-AfterSave----"); + this.ownerRepository.findAll(Pageable.unpaged()).forEach(i -> LOG.info(i.toString())); + + final Visit visit = createVisit(); + owner.addVisit("Peter", visit); + this.ownerRepository.save(owner); + + LOG.info("----Owner-AfterVisit----"); + this.ownerRepository + .findByLastName("Nicks", Pageable.unpaged()) + .forEach(i -> + { + LOG.info(i.toString()); + i.getPets().forEach(p -> { + LOG.info(p.toString()); + p.getVisits().forEach(v -> LOG.info(v.toString())); + } + ); + } + ); + } + + private static Visit createVisit() + { + final Visit visit = new Visit(); + visit.setDate(LocalDate.now()); + visit.setDescription("Peter got his first parvovirus vaccine"); + return visit; + } + + private static Vet createVet() + { + final Vet vet = new Vet(); + vet.setFirstName("Mick"); + vet.setLastName("Fleetwood"); + final Specialty specialty = new Specialty(); + specialty.setName("Vaccination"); + vet.addSpecialty(specialty); + return vet; + } + + private static Owner createOwner() + { + final Owner owner = new Owner(); + owner.setFirstName("Stevie"); + owner.setLastName("Nicks"); + final Pet pet = new Pet(); + pet.setBirthDate(LocalDate.now().minus(6, ChronoUnit.WEEKS)); + pet.setName("Peter"); + final PetType petType = new PetType(); + petType.setName("Dog"); + pet.setType(petType); + owner.addPet(pet); + return owner; + } +} diff --git a/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/model/BaseEntity.java b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/model/BaseEntity.java new file mode 100644 index 00000000..49b933ac --- /dev/null +++ b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/model/BaseEntity.java @@ -0,0 +1,49 @@ +/* + * Copyright 2012-2019 the original author or authors. + * + * 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 + * + * https://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.demo.complex.model; + +import java.io.Serializable; + +import org.springframework.data.annotation.Id; + +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; + + +public class BaseEntity implements Serializable +{ + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private Integer id; + + public Integer getId() + { + return this.id; + } + + public boolean isNew() + { + return this.id == null; + } + + @Override + public String toString() + { + return "BaseEntity{" + + "id=" + this.id + + '}'; + } +} diff --git a/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/model/NamedEntity.java b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/model/NamedEntity.java new file mode 100644 index 00000000..75b59b5e --- /dev/null +++ b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/model/NamedEntity.java @@ -0,0 +1,37 @@ +/* + * Copyright 2012-2019 the original author or authors. + * + * 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 + * + * https://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.demo.complex.model; + +public class NamedEntity extends BaseEntity +{ + private String name; + + public String getName() + { + return this.name; + } + + public void setName(final String name) + { + this.name = name; + } + + @Override + public String toString() + { + return this.getName(); + } +} diff --git a/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/model/Person.java b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/model/Person.java new file mode 100644 index 00000000..d5aeeeff --- /dev/null +++ b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/model/Person.java @@ -0,0 +1,52 @@ +/* + * Copyright 2012-2019 the original author or authors. + * + * 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 + * + * https://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.demo.complex.model; + +public class Person extends BaseEntity +{ + private String firstName; + + private String lastName; + + public String getFirstName() + { + return this.firstName; + } + + public void setFirstName(final String firstName) + { + this.firstName = firstName; + } + + public String getLastName() + { + return this.lastName; + } + + public void setLastName(final String lastName) + { + this.lastName = lastName; + } + + @Override + public String toString() + { + return "Person{" + + "firstName='" + this.firstName + '\'' + + ", lastName='" + this.lastName + '\'' + + '}'; + } +} diff --git a/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/owner/Owner.java b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/owner/Owner.java new file mode 100644 index 00000000..1cf16094 --- /dev/null +++ b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/owner/Owner.java @@ -0,0 +1,96 @@ +/* + * Copyright 2012-2019 the original author or authors. + * + * 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 + * + * https://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.demo.complex.owner; + +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; + +import org.springframework.core.style.ToStringCreator; +import org.springframework.util.Assert; + +import software.xdev.spring.data.eclipse.store.demo.complex.model.Person; + + +public class Owner extends Person +{ + private String address; + + private String city; + + private String telephone; + + private final List pets = new ArrayList<>(); + + public String getAddress() + { + return this.address; + } + + public String getCity() + { + return this.city; + } + + public String getTelephone() + { + return this.telephone; + } + + public List getPets() + { + return this.pets; + } + + public void addPet(final Pet pet) + { + if(pet.isNew()) + { + this.getPets().add(pet); + } + } + + public Optional getPet(final String name) + { + return this.getPets().stream().filter(p -> p.getName().equalsIgnoreCase(name)).findFirst(); + } + + @Override + public String toString() + { + return new ToStringCreator(this) + .append("id", this.getId()) + .append("new", this.isNew()) + .append("lastName", this.getLastName()) + .append("firstName", this.getFirstName()) + .append("address", this.getAddress()) + .append("city", this.getCity()) + .append("telephone", this.getTelephone()) + .toString(); + } + + public void addVisit(final String petName, final Visit visit) + { + Assert.notNull(petName, "Pet name must not be null!"); + Assert.notNull(visit, "Visit must not be null!"); + + final Optional pet = this.getPet(petName); + + Assert.isTrue(pet.isPresent(), "Invalid Pet name!"); + + pet.get().addVisit(visit); + } +} diff --git a/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/owner/OwnerRepository.java b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/owner/OwnerRepository.java new file mode 100644 index 00000000..03b735b1 --- /dev/null +++ b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/owner/OwnerRepository.java @@ -0,0 +1,32 @@ +/* + * Copyright 2012-2019 the original author or authors. + * + * 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 + * + * https://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.demo.complex.owner; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.repository.Repository; + + +public interface OwnerRepository extends Repository +{ + Page findByLastName(String lastName, Pageable pageable); + + void save(Owner owner); + + Page findAll(Pageable pageable); + + void deleteAll(); +} diff --git a/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/owner/Pet.java b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/owner/Pet.java new file mode 100644 index 00000000..56a7d217 --- /dev/null +++ b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/owner/Pet.java @@ -0,0 +1,77 @@ +/* + * Copyright 2012-2019 the original author or authors. + * + * 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 + * + * https://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.demo.complex.owner; + +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import org.springframework.core.style.ToStringCreator; + +import software.xdev.spring.data.eclipse.store.demo.complex.model.NamedEntity; + + +public class Pet extends NamedEntity +{ + private LocalDate birthDate; + + private PetType type; + + private final List visits = new ArrayList<>(); + + public void setBirthDate(final LocalDate birthDate) + { + this.birthDate = birthDate; + } + + public LocalDate getBirthDate() + { + return this.birthDate; + } + + public PetType getType() + { + return this.type; + } + + public void setType(final PetType type) + { + this.type = type; + } + + public Collection getVisits() + { + return this.visits; + } + + public void addVisit(final Visit visit) + { + this.getVisits().add(visit); + } + + @Override + public String toString() + { + return new ToStringCreator(this) + .append("id", this.getId()) + .append("new", this.isNew()) + .append("name", this.getName()) + .append("birthday", this.getBirthDate()) + .append("type", this.getType()) + .toString(); + } +} diff --git a/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/owner/PetType.java b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/owner/PetType.java new file mode 100644 index 00000000..b51373bc --- /dev/null +++ b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/owner/PetType.java @@ -0,0 +1,24 @@ +/* + * Copyright 2012-2019 the original author or authors. + * + * 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 + * + * https://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.demo.complex.owner; + +import software.xdev.spring.data.eclipse.store.demo.complex.model.NamedEntity; + + +public class PetType extends NamedEntity +{ + +} diff --git a/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/owner/Visit.java b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/owner/Visit.java new file mode 100644 index 00000000..e94e5c43 --- /dev/null +++ b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/owner/Visit.java @@ -0,0 +1,66 @@ +/* + * Copyright 2012-2019 the original author or authors. + * + * 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 + * + * https://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.demo.complex.owner; + +import java.time.LocalDate; + +import org.springframework.core.style.ToStringCreator; + +import software.xdev.spring.data.eclipse.store.demo.complex.model.BaseEntity; + + +public class Visit extends BaseEntity +{ + private LocalDate date; + + private String description; + + public Visit() + { + this.date = LocalDate.now(); + } + + public LocalDate getDate() + { + return this.date; + } + + public void setDate(final LocalDate date) + { + this.date = date; + } + + public String getDescription() + { + return this.description; + } + + public void setDescription(final String description) + { + this.description = description; + } + + @Override + public String toString() + { + return new ToStringCreator(this) + .append("id", this.getId()) + .append("new", this.isNew()) + .append("date", this.getDate()) + .append("description", this.getDescription()) + .toString(); + } +} diff --git a/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/vet/Specialty.java b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/vet/Specialty.java new file mode 100644 index 00000000..b1709d76 --- /dev/null +++ b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/vet/Specialty.java @@ -0,0 +1,24 @@ +/* + * Copyright 2012-2019 the original author or authors. + * + * 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 + * + * https://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.demo.complex.vet; + +import software.xdev.spring.data.eclipse.store.demo.complex.model.NamedEntity; + + +public class Specialty extends NamedEntity +{ + +} diff --git a/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/vet/Vet.java b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/vet/Vet.java new file mode 100644 index 00000000..7adc4359 --- /dev/null +++ b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/vet/Vet.java @@ -0,0 +1,66 @@ +/* + * Copyright 2012-2019 the original author or authors. + * + * 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 + * + * https://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.demo.complex.vet; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.springframework.beans.support.MutableSortDefinition; +import org.springframework.beans.support.PropertyComparator; +import org.springframework.core.style.ToStringCreator; + +import software.xdev.spring.data.eclipse.store.demo.complex.model.Person; + + +public class Vet extends Person +{ + private Set specialties; + + protected Set getSpecialtiesInternal() + { + if(this.specialties == null) + { + this.specialties = new HashSet<>(); + } + return this.specialties; + } + + public List getSpecialties() + { + final List sortedSpecs = new ArrayList<>(this.getSpecialtiesInternal()); + PropertyComparator.sort(sortedSpecs, new MutableSortDefinition("name", true, true)); + return Collections.unmodifiableList(sortedSpecs); + } + + public void addSpecialty(final Specialty specialty) + { + this.getSpecialtiesInternal().add(specialty); + } + + @Override + public String toString() + { + return new ToStringCreator(this) + .append("id", this.getId()) + .append("firstName", this.getFirstName()) + .append("lastName", this.getLastName()) + .append("specialties", this.getSpecialties()) + .toString(); + } +} diff --git a/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/vet/VetRepository.java b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/vet/VetRepository.java new file mode 100644 index 00000000..219c6c65 --- /dev/null +++ b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/vet/VetRepository.java @@ -0,0 +1,31 @@ +/* + * Copyright 2012-2019 the original author or authors. + * + * 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 + * + * https://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.demo.complex.vet; + +import java.util.Collection; + +import org.springframework.data.repository.Repository; + + +public interface VetRepository extends Repository +{ + Collection findAll(); + + void deleteAll(); + + @SuppressWarnings("UnusedReturnValue") + Vet save(final Vet entity); +} diff --git a/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/simple/Customer.java b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/simple/Customer.java new file mode 100644 index 00000000..98b55e2e --- /dev/null +++ b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/simple/Customer.java @@ -0,0 +1,27 @@ +package software.xdev.spring.data.eclipse.store.demo.simple; + +import org.springframework.data.annotation.Id; + + +public class Customer +{ + @Id + public String id; + + private final String firstName; + private final String lastName; + + public Customer(final String firstName, final String lastName) + { + this.firstName = firstName; + this.lastName = lastName; + } + + @Override + public String toString() + { + return String.format( + "Customer[id=%s, firstName='%s', lastName='%s']", + this.id, this.firstName, this.lastName); + } +} diff --git a/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/simple/CustomerRepository.java b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/simple/CustomerRepository.java new file mode 100644 index 00000000..7ee24418 --- /dev/null +++ b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/simple/CustomerRepository.java @@ -0,0 +1,8 @@ +package software.xdev.spring.data.eclipse.store.demo.simple; + +import org.springframework.data.repository.CrudRepository; + + +public interface CustomerRepository extends CrudRepository +{ +} diff --git a/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/simple/Pet.java b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/simple/Pet.java new file mode 100644 index 00000000..bb0294c0 --- /dev/null +++ b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/simple/Pet.java @@ -0,0 +1,31 @@ +package software.xdev.spring.data.eclipse.store.demo.simple; + +import org.springframework.data.annotation.Id; + + +public class Pet +{ + @Id + public String id; + + private String name; + private Integer age; + + public Pet() + { + } + + public Pet(final String name, final Integer age) + { + this.name = name; + this.age = age; + } + + @Override + public String toString() + { + return String.format( + "Pet[id=%s, name='%s', age='%s']", + this.id, this.name, this.age); + } +} diff --git a/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/simple/PetRepository.java b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/simple/PetRepository.java new file mode 100644 index 00000000..5e6c8e79 --- /dev/null +++ b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/simple/PetRepository.java @@ -0,0 +1,8 @@ +package software.xdev.spring.data.eclipse.store.demo.simple; + +import org.springframework.data.repository.CrudRepository; + + +public interface PetRepository extends CrudRepository +{ +} diff --git a/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/simple/SimpleDemoApplication.java b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/simple/SimpleDemoApplication.java new file mode 100644 index 00000000..f906524e --- /dev/null +++ b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/simple/SimpleDemoApplication.java @@ -0,0 +1,69 @@ +/* + * Copyright 2012-2019 the original author or authors. + * + * 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 + * + * https://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.demo.simple; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.boot.CommandLineRunner; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.ConfigurableApplicationContext; + +import software.xdev.spring.data.eclipse.store.repository.config.EnableEclipseStoreRepositories; + + +@SpringBootApplication +@EnableEclipseStoreRepositories +public class SimpleDemoApplication implements CommandLineRunner +{ + private static final Logger LOG = LoggerFactory.getLogger(SimpleDemoApplication.class); + private final CustomerRepository customerRepository; + private final PetRepository petRepository; + + public SimpleDemoApplication(final CustomerRepository customerRepository, final PetRepository petRepository) + { + this.customerRepository = customerRepository; + this.petRepository = petRepository; + } + + public static void main(final String[] args) + { + final ConfigurableApplicationContext run = SpringApplication.run(SimpleDemoApplication.class, args); + run.close(); + } + + @Override + public void run(final String... args) + { + this.customerRepository.deleteAll(); + + // save a couple of customers + this.customerRepository.save(new Customer("Stevie", "Nicks")); + this.customerRepository.save(new Customer("Mick", "Fleetwood")); + + // fetch all customers + LOG.info("Customers found with findAll():"); + this.customerRepository.findAll().forEach(c -> LOG.info(c.toString())); + + // save a pet + this.petRepository.save(new Pet("Peter", 2)); + + // fetch all pets + LOG.info("Pets found with findAll():"); + this.petRepository.findAll().forEach(p -> LOG.info(p.toString())); + } +} diff --git a/spring-data-eclipse-store-demo/src/main/resources/log4j2.xml b/spring-data-eclipse-store-demo/src/main/resources/log4j2.xml new file mode 100644 index 00000000..fe8fd792 --- /dev/null +++ b/spring-data-eclipse-store-demo/src/main/resources/log4j2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/spring-data-eclipse-store/pom.xml b/spring-data-eclipse-store/pom.xml index 5259321e..2aff8dfa 100644 --- a/spring-data-eclipse-store/pom.xml +++ b/spring-data-eclipse-store/pom.xml @@ -42,11 +42,23 @@
+ 17 ${javaVersion} UTF-8 UTF-8 + + 1.1.0-SNAPSHOT + 5.8.1 + 6.1.2 + 3.2.1 + + 3.2.0 + 5.3.3 + 2.0.9 + 4.0.1 + 3.1.0 @@ -59,6 +71,20 @@ false + + + + + ossrh + https://oss.sonatype.org/content/repositories/snapshots + + false + + + true + + + @@ -73,6 +99,116 @@ + + + org.springframework.data + spring-data-commons + ${spring-data-commons.version} + + + org.springframework + spring-tx + ${spring-context-beans-tx.version} + + + org.springframework + spring-context + ${spring-context-beans-tx.version} + + + org.springframework + spring-beans + ${spring-context-beans-tx.version} + + + + jakarta.enterprise + jakarta.enterprise.cdi-api + ${jakarta.enterprise.version} + + + jakarta.persistence + jakarta.persistence-api + ${jakarta.version} + + + org.slf4j + slf4j-api + ${slf4j.version} + + + + + org.eclipse.store + storage-embedded + ${eclipse-store.version} + + + org.eclipse.store + integrations-spring-boot3 + ${eclipse-store.version} + + + org.eclipse.serializer + serializer + ${eclipse-store.version} + + + org.eclipse.serializer + persistence-binary-jdk17 + ${eclipse-store.version} + + + + org.junit.jupiter + junit-jupiter-engine + ${junit-jupiter.version} + test + + + org.junit.jupiter + junit-jupiter-api + ${junit-jupiter.version} + test + + + org.junit.jupiter + junit-jupiter-params + ${junit-jupiter.version} + test + + + org.springframework + spring-test + ${spring-test.version} + test + + + org.apache.logging.log4j + log4j-api + 2.22.0 + test + + + org.apache.logging.log4j + log4j-core + 2.22.0 + test + + + org.apache.logging.log4j + log4j-slf4j2-impl + 2.22.0 + test + + + org.springframework.boot + spring-boot-autoconfigure + ${spring-boot.version} + test + + + ossrh @@ -144,6 +280,19 @@ none + + org.apache.maven.plugins + maven-surefire-plugin + 3.1.2 + + + --add-opens java.base/java.util=ALL-UNNAMED + --add-opens java.base/java.lang=ALL-UNNAMED + --add-opens=java.base/java.lang.reflect=ALL-UNNAMED + --add-exports java.base/jdk.internal.misc=ALL-UNNAMED + + + org.apache.maven.plugins maven-source-plugin diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/aot/EclipseStoreRuntimeHints.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/aot/EclipseStoreRuntimeHints.java new file mode 100644 index 00000000..20352c97 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/aot/EclipseStoreRuntimeHints.java @@ -0,0 +1,46 @@ +/* + * Copyright © 2023 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.aot; + +import org.springframework.aot.hint.RuntimeHints; +import org.springframework.aot.hint.RuntimeHintsRegistrar; +import org.springframework.lang.Nullable; + +import jakarta.annotation.Nonnull; + + +/** + * Makes registration of types for reflection ({@link org.springframework.aot.hint.RuntimeHints} or proxies possible. + *

+ * Is not needed right now, but is left here for future use. + * + * @see https://docs.spring + * .io/spring-framework/reference/core/aot.html#aot.hints + */ +class EclipseStoreRuntimeHints implements RuntimeHintsRegistrar +{ + public EclipseStoreRuntimeHints() + { + // Is not needed right now, but is left here for future use. + } + + @Override + @Nonnull + public void registerHints(@Nonnull final RuntimeHints hints, @Nullable final ClassLoader classLoader) + { + // Is not needed right now, but is left here for future use. + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/core/IdentitySet.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/core/IdentitySet.java new file mode 100644 index 00000000..d73b2a2d --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/core/IdentitySet.java @@ -0,0 +1,142 @@ +/* + * Copyright © 2023 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.core; + +import java.util.Collection; +import java.util.IdentityHashMap; +import java.util.Iterator; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +import org.eclipse.serializer.meta.NotImplementedYetError; +import org.springframework.lang.NonNull; + +import jakarta.annotation.Nonnull; + + +/** + * A hash map implementation depending on object identity (==) rather than equality (.equals) to identify elements. + **/ +public class IdentitySet implements Set +{ + private final IdentityHashMap internalMap; + + public IdentitySet() + { + this.internalMap = new IdentityHashMap<>(); + } + + @Override + public int size() + { + return this.internalMap.size(); + } + + @Override + public boolean isEmpty() + { + return this.internalMap.isEmpty(); + } + + @SuppressWarnings("SuspiciousMethodCalls") + @Override + public boolean contains(final Object o) + { + return this.internalMap.containsKey(o); + } + + @Override + @Nonnull + public Iterator iterator() + { + return this.internalMap.keySet().iterator(); + } + + @Override + @Nonnull + public Object[] toArray() + { + return this.internalMap.keySet().toArray(); + } + + @Override + @NonNull + public T[] toArray(@Nonnull final T[] a) + { + return this.internalMap.keySet().toArray(a); + } + + @Override + public boolean add(final E e) + { + return this.internalMap.put(e, null) == null; + } + + @Override + public boolean remove(final Object o) + { + return this.internalMap.remove(o) != null; + } + + @Override + public boolean containsAll(@Nonnull final Collection c) + { + return this.internalMap.keySet().containsAll(c); + } + + @Override + public boolean addAll(@Nonnull final Collection c) + { + throw new NotImplementedYetError(); + } + + @Override + public boolean retainAll(@Nonnull final Collection c) + { + throw new NotImplementedYetError(); + } + + @Override + public boolean removeAll(final Collection c) + { + return c.stream().map(this.internalMap::remove).anyMatch(Objects::nonNull); + } + + @Override + public void clear() + { + this.internalMap.clear(); + } + + @SuppressWarnings("com.haulmont.jpb.EqualsDoesntCheckParameterClass") + @Override + public boolean equals(final Object o) + { + return this.internalMap.equals(o); + } + + @Override + public int hashCode() + { + return this.internalMap.hashCode(); + } + + public Map getInternalMap() + { + return this.internalMap; + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/AlreadyRegisteredException.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/AlreadyRegisteredException.java new file mode 100644 index 00000000..a0ba3bf7 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/AlreadyRegisteredException.java @@ -0,0 +1,24 @@ +/* + * Copyright © 2023 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 AlreadyRegisteredException extends RuntimeException +{ + public AlreadyRegisteredException(final String entityName) + { + super(String.format("Entity %s already registered.", entityName)); + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/DifferentClassesException.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/DifferentClassesException.java new file mode 100644 index 00000000..9eee8d81 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/DifferentClassesException.java @@ -0,0 +1,24 @@ +/* + * Copyright © 2023 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 DifferentClassesException extends RuntimeException +{ + public DifferentClassesException(final String message) + { + super(message); + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/FieldAccessReflectionException.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/FieldAccessReflectionException.java new file mode 100644 index 00000000..a5c854c7 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/FieldAccessReflectionException.java @@ -0,0 +1,34 @@ +/* + * Copyright © 2023 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; + +import java.lang.reflect.Field; + + +public class FieldAccessReflectionException extends RuntimeException +{ + public static final String COULD_NOT_READ_FIELD = "Could not read field %s"; + + public FieldAccessReflectionException(final String message, final Exception e) + { + super(message, e); + } + + public FieldAccessReflectionException(final Field field, final Exception e) + { + this(String.format(FieldAccessReflectionException.COULD_NOT_READ_FIELD, field.getName()), e); + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/IdGeneratorNotSupportedException.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/IdGeneratorNotSupportedException.java new file mode 100644 index 00000000..808049b7 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/IdGeneratorNotSupportedException.java @@ -0,0 +1,24 @@ +/* + * Copyright © 2023 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 IdGeneratorNotSupportedException extends RuntimeException +{ + public IdGeneratorNotSupportedException(final String message) + { + super(message); + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/MergeFailedException.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/MergeFailedException.java new file mode 100644 index 00000000..0999a8c3 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/MergeFailedException.java @@ -0,0 +1,31 @@ +/* + * Copyright © 2023 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 MergeFailedException extends RuntimeException +{ + public MergeFailedException(final Object sourceObject, final Object targetObject, final Exception e) + { + super( + String.format( + "Could not merge values of object %s with object %s", + sourceObject.toString(), + targetObject.toString() + ), + e + ); + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/NoIdFieldFoundException.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/NoIdFieldFoundException.java new file mode 100644 index 00000000..cd9c6f7f --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/NoIdFieldFoundException.java @@ -0,0 +1,24 @@ +/* + * Copyright © 2023 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 NoIdFieldFoundException extends RuntimeException +{ + public NoIdFieldFoundException(final String message) + { + super(message); + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/NoPageableObjectFoundException.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/NoPageableObjectFoundException.java new file mode 100644 index 00000000..c49733a4 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/NoPageableObjectFoundException.java @@ -0,0 +1,24 @@ +/* + * Copyright © 2023 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 NoPageableObjectFoundException extends RuntimeException +{ + public NoPageableObjectFoundException(final String message) + { + super(message); + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/NotComparableException.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/NotComparableException.java new file mode 100644 index 00000000..115e2b8f --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/NotComparableException.java @@ -0,0 +1,24 @@ +/* + * Copyright © 2023 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 NotComparableException extends RuntimeException +{ + public NotComparableException(final String message) + { + super(message); + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/StringBlankException.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/StringBlankException.java new file mode 100644 index 00000000..78d203f2 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/StringBlankException.java @@ -0,0 +1,29 @@ +/* + * Copyright © 2023 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 StringBlankException extends RuntimeException +{ + public StringBlankException() + { + this("String is empty or blank."); + } + + public StringBlankException(final String message) + { + super(message); + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/EclipseStoreRepository.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/EclipseStoreRepository.java new file mode 100644 index 00000000..e311af0c --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/EclipseStoreRepository.java @@ -0,0 +1,27 @@ +/* + * Copyright © 2023 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.repository; + +import org.springframework.data.repository.ListCrudRepository; +import org.springframework.data.repository.ListPagingAndSortingRepository; +import org.springframework.data.repository.NoRepositoryBean; + + +@NoRepositoryBean +public interface EclipseStoreRepository + extends ListCrudRepository, ListPagingAndSortingRepository +{ +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/EclipseStoreStorage.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/EclipseStoreStorage.java new file mode 100644 index 00000000..b627465c --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/EclipseStoreStorage.java @@ -0,0 +1,293 @@ +/* + * Copyright © 2023 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.repository; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Consumer; +import java.util.function.Supplier; + +import org.eclipse.serializer.persistence.types.Storer; +import org.eclipse.store.integrations.spring.boot.types.EclipseStoreProvider; +import org.eclipse.store.integrations.spring.boot.types.configuration.EclipseStoreProperties; +import org.eclipse.store.storage.embedded.types.EmbeddedStorageFoundation; +import org.eclipse.store.storage.types.StorageManager; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +import jakarta.inject.Inject; +import jakarta.inject.Named; +import software.xdev.spring.data.eclipse.store.core.IdentitySet; +import software.xdev.spring.data.eclipse.store.exceptions.AlreadyRegisteredException; +import software.xdev.spring.data.eclipse.store.repository.support.copier.id.IdSetter; +import software.xdev.spring.data.eclipse.store.repository.support.reposyncer.RepositorySynchronizer; +import software.xdev.spring.data.eclipse.store.repository.support.reposyncer.SimpleRepositorySynchronizer; + + +@Component +public class EclipseStoreStorage implements EntityListProvider, IdSetterProvider, PersistableChecker +{ + private static final Logger LOG = LoggerFactory.getLogger(EclipseStoreStorage.class); + private final Map, String> entityClassToRepositoryName = new HashMap<>(); + private final Map, IdSetter> entityClassToIdSetter = new HashMap<>(); + private EntitySetCollector entitySetCollector; + private PersistableChecker persistenceChecker; + + private final EclipseStoreProperties storeConfiguration; + private final EclipseStoreProvider storeProvider; + + private StorageManager storageManager; + private Root root = null; + + private final WorkingCopyRegistry registry = new WorkingCopyRegistry(); + private RepositorySynchronizer repositorySynchronizer; + + @Inject + public EclipseStoreStorage( + @Named("eclipseStoreProperties") final EclipseStoreProperties storeConfiguration, + final EclipseStoreProvider storeProvider) + { + this.storeConfiguration = storeConfiguration; + this.storeProvider = storeProvider; + } + + private synchronized StorageManager getInstanceOfStorageManager() + { + this.ensureEntitiesInRoot(); + return this.storageManager; + } + + public WorkingCopyRegistry getRegistry() + { + return this.registry; + } + + private synchronized void ensureEntitiesInRoot() + { + if(this.storageManager == null) + { + LOG.info("Starting storage..."); + this.root = new Root(); + final EmbeddedStorageFoundation embeddedStorageFoundation = + this.storeProvider.createStorageFoundation(this.storeConfiguration); + this.storageManager = embeddedStorageFoundation.start(this.root); + this.persistenceChecker = new RelayedPersistenceChecker(embeddedStorageFoundation); + this.initRoot(); + final Integer entitySum = + this.root.getEntityLists().values().stream().map(IdentitySet::size).reduce(0, Integer::sum); + LOG.info( + "Storage started with {} entity lists and {} entities.", + this.root.getEntityLists().size(), + entitySum); + } + } + + private void initRoot() + { + if(LOG.isDebugEnabled()) + { + LOG.debug("Initializing entity lists..."); + } + this.repositorySynchronizer = + new SimpleRepositorySynchronizer(this.entityClassToRepositoryName, this.root); + boolean entityListMustGetStored = false; + for(final String entityName : this.entityClassToRepositoryName.values()) + { + if(!this.root.getEntityLists().containsKey(entityName)) + { + this.root.getEntityLists().put(entityName, new IdentitySet<>()); + entityListMustGetStored = true; + } + } + if(entityListMustGetStored) + { + this.storageManager.store(this.root.getEntityLists()); + } + this.entitySetCollector = new EntitySetCollector(this.root.getEntityLists(), this.entityClassToRepositoryName); + if(LOG.isDebugEnabled()) + { + LOG.debug("Done initializing entity lists."); + } + } + + public synchronized void registerEntity(final Class classToRegister) + { + final String entityName = this.getEntityName(classToRegister); + if(this.entityClassToRepositoryName.containsKey(classToRegister)) + { + throw new AlreadyRegisteredException(entityName); + } + this.entityClassToRepositoryName.put(classToRegister, entityName); + } + + private String getEntityName(final Class classToRegister) + { + return classToRegister.getName(); + } + + @SuppressWarnings("unchecked") + @Override + public synchronized IdentitySet getEntityList(final Class clazz) + { + this.ensureEntitiesInRoot(); + return (IdentitySet)this.root.getEntityLists().get(this.getEntityName(clazz)); + } + + public synchronized void store( + final Collection nonEntitiesToStore, + final Class clazz, + final Iterable entitiesToStore) + { + final Collection entitiesAndPossiblyNonEntitiesToStore = + this.collectRootEntitiesToStore(clazz, entitiesToStore); + entitiesAndPossiblyNonEntitiesToStore.addAll(nonEntitiesToStore); + if(LOG.isDebugEnabled()) + { + LOG.debug("Collected {} objects store in total.", entitiesAndPossiblyNonEntitiesToStore.size()); + } + final Storer storer = this.storageManager.createLazyStorer(); + storer.storeAll(entitiesAndPossiblyNonEntitiesToStore); + storer.commit(); + if(LOG.isDebugEnabled()) + { + LOG.debug("Done storing {} entities...", entitiesAndPossiblyNonEntitiesToStore.size()); + } + } + + /** + * Also collects the object-list to store, if necessary. + */ + private Collection collectRootEntitiesToStore(final Class clazz, final Iterable entitiesToStore) + { + final List> entityLists = + this.entitySetCollector.getRelatedIdentitySets(clazz); + final Collection objectsToStore = new ArrayList<>(); + for(final T entityToStore : entitiesToStore) + { + entityLists.forEach( + relatedIdentitySet -> + { + if(!relatedIdentitySet.contains(entityToStore)) + { + relatedIdentitySet.add(entityToStore); + objectsToStore.add(relatedIdentitySet.getInternalMap()); + } + } + ); + objectsToStore.add(entityToStore); + // Add the separate lists of entities to store. + this.repositorySynchronizer.syncAndReturnChangedObjectLists(entityToStore).forEach( + changedEntityList -> objectsToStore.add(changedEntityList.getInternalMap()) + ); + } + return objectsToStore; + } + + public synchronized void delete(final Class clazz, final T objectToRemove) + { + final List> entityLists = + this.entitySetCollector.getRelatedIdentitySets(clazz); + entityLists.forEach(entityList -> + { + entityList.remove(objectToRemove); + this.storageManager.store(entityList.getInternalMap()); + }); + if(LOG.isDebugEnabled()) + { + LOG.debug("Deleted single entity of class {}.", clazz.getSimpleName()); + } + } + + public synchronized void deleteAll(final Class clazz) + { + this.ensureEntitiesInRoot(); + final IdentitySet entities = this.root.getEntityLists().get(this.getEntityName(clazz)); + final int oldSize = entities.size(); + final List> entityLists = + this.entitySetCollector.getRelatedIdentitySets(clazz); + entityLists.forEach(entityList -> + { + entityList.removeAll(entities); + this.storageManager.store(entityList.getInternalMap()); + }); + if(LOG.isDebugEnabled()) + { + LOG.debug("Deleted {} entities of class {}.", oldSize, clazz.getSimpleName()); + } + } + + public synchronized void clearData() + { + this.root = new Root(); + final StorageManager instanceOfstorageManager = this.getInstanceOfStorageManager(); + this.initRoot(); + + instanceOfstorageManager.setRoot(this.root); + instanceOfstorageManager.storeRoot(); + if(LOG.isDebugEnabled()) + { + LOG.debug("Cleared all entities."); + } + } + + public synchronized void stop() + { + LOG.info("Stopping storage..."); + if(this.storageManager != null) + { + this.storageManager.shutdown(); + this.storageManager = null; + this.root = null; + this.registry.reset(); + this.entityClassToIdSetter.clear(); + LOG.info("Stopped storage."); + } + else + { + LOG.info("No storage is running. Nothing to stop."); + } + } + + @Override + @SuppressWarnings("unchecked") + public IdSetter ensureIdSetter(final Class domainClass) + { + return (IdSetter)this.entityClassToIdSetter.computeIfAbsent( + domainClass, + clazz -> + { + final String entityName = this.getEntityName(domainClass); + final Consumer idSetter = id -> + { + this.root.getLastIds().put(entityName, id); + this.storageManager.store(this.root.getLastIds()); + }; + final Supplier idGetter = () -> this.root.getLastIds().get(entityName); + return IdSetter.createIdSetter(domainClass, idSetter, idGetter); + } + ); + } + + @Override + public boolean isPersistable(final Class clazz) + { + return this.persistenceChecker.isPersistable(clazz); + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/EntityListProvider.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/EntityListProvider.java new file mode 100644 index 00000000..ef1edfd3 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/EntityListProvider.java @@ -0,0 +1,24 @@ +/* + * Copyright © 2023 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.repository; + +import software.xdev.spring.data.eclipse.store.core.IdentitySet; + + +public interface EntityListProvider +{ + IdentitySet getEntityList(final Class clazz); +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/EntitySetCollector.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/EntitySetCollector.java new file mode 100644 index 00000000..f0c6ddb7 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/EntitySetCollector.java @@ -0,0 +1,79 @@ +/* + * Copyright © 2023 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.repository; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import software.xdev.spring.data.eclipse.store.core.IdentitySet; + + +public class EntitySetCollector +{ + private static final Logger LOG = LoggerFactory.getLogger(EntitySetCollector.class); + private final Map, List>> childClassToParentSets = new HashMap<>(); + + public EntitySetCollector + ( + final Map> entityLists, + final Map, String> entityClassToRepositoryName + ) + { + this.buildParentClassList(entityLists, entityClassToRepositoryName); + } + + private void buildParentClassList( + final Map> entityLists, + final Map, String> entityClassToRepositoryName + ) + { + if(LOG.isDebugEnabled()) + { + LOG.debug("Initializing parent class list..."); + } + for(final Class possibleParentClass : entityClassToRepositoryName.keySet()) + { + for(final Class possibleChildClass : entityClassToRepositoryName.keySet()) + { + this.childClassToParentSets.putIfAbsent( + possibleChildClass, new ArrayList<>() + ); + if(possibleParentClass.isAssignableFrom(possibleChildClass)) + { + this.childClassToParentSets.get(possibleChildClass) + .add(entityLists.get(entityClassToRepositoryName.get(possibleParentClass))); + } + } + } + if(LOG.isDebugEnabled()) + { + LOG.debug("Done initializing parent class list."); + } + } + + /** + * @return a list with all related IdentitySets (including its own). + */ + public List> getRelatedIdentitySets(final Class clazz) + { + return this.childClassToParentSets.get(clazz); + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/IdSetterProvider.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/IdSetterProvider.java new file mode 100644 index 00000000..1e2e7133 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/IdSetterProvider.java @@ -0,0 +1,24 @@ +/* + * Copyright © 2023 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.repository; + +import software.xdev.spring.data.eclipse.store.repository.support.copier.id.IdSetter; + + +public interface IdSetterProvider +{ + IdSetter ensureIdSetter(final Class domainClass); +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/PersistableChecker.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/PersistableChecker.java new file mode 100644 index 00000000..c243618f --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/PersistableChecker.java @@ -0,0 +1,22 @@ +/* + * Copyright © 2023 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.repository; + +@FunctionalInterface +public interface PersistableChecker +{ + boolean isPersistable(Class clazz); +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/Query.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/Query.java new file mode 100644 index 00000000..f56ba3f1 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/Query.java @@ -0,0 +1,44 @@ +/* + * Copyright © 2023 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.repository; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +import org.springframework.data.annotation.QueryAnnotation; + + +/** + * Currently only exists to write a warning at runtime. + *

+ * The library should be as compatible as possible with Spring JPA. + * A @Query-Annotation is often used in these projects. + * Keeping these annotations existing in code would cause an error. With this class the user can use the + * annotation as before except with a different import. While running the application a warning is shown to + * indicate that this is something to look after. It doesn't cause any problems, but it also doesn't do what + * the user is used to in Spring JPA. This annotation does effectively nothing except write the warning message. + */ +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.METHOD, ElementType.ANNOTATION_TYPE}) +@Documented +@QueryAnnotation +public @interface Query +{ + @SuppressWarnings("unused") String value() default ""; +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/RelayedPersistenceChecker.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/RelayedPersistenceChecker.java new file mode 100644 index 00000000..ab89f64a --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/RelayedPersistenceChecker.java @@ -0,0 +1,36 @@ +/* + * Copyright © 2023 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.repository; + +import org.eclipse.serializer.persistence.types.PersistenceTypeEvaluator; +import org.eclipse.store.storage.embedded.types.EmbeddedStorageFoundation; + + +public class RelayedPersistenceChecker implements PersistableChecker +{ + private final PersistenceTypeEvaluator evaluator; + + public RelayedPersistenceChecker(final EmbeddedStorageFoundation foundation) + { + this.evaluator = foundation.getTypeEvaluatorPersistable(); + } + + @Override + public boolean isPersistable(final Class clazz) + { + return this.evaluator.isPersistableType(clazz); + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/Root.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/Root.java new file mode 100644 index 00000000..ad078410 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/Root.java @@ -0,0 +1,47 @@ +/* + * Copyright © 2023 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.repository; + +import java.util.HashMap; +import java.util.Map; + +import software.xdev.spring.data.eclipse.store.core.IdentitySet; + + +/** + * This is the actually stored object. + */ +public class Root +{ + private final Map> entityLists; + private final Map lastIds; + + public Root() + { + this.entityLists = new HashMap<>(); + this.lastIds = new HashMap<>(); + } + + public Map> getEntityLists() + { + return this.entityLists; + } + + public Map getLastIds() + { + return this.lastIds; + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/WorkingCopyRegistry.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/WorkingCopyRegistry.java new file mode 100644 index 00000000..6f2b0b56 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/WorkingCopyRegistry.java @@ -0,0 +1,103 @@ +/* + * Copyright © 2023 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.repository; + +import java.util.IdentityHashMap; +import java.util.Map; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import software.xdev.spring.data.eclipse.store.exceptions.DifferentClassesException; + + +public class WorkingCopyRegistry +{ + private static final Logger LOG = LoggerFactory.getLogger(WorkingCopyRegistry.class); + private Map currentWorkingCopies = new IdentityHashMap<>(); + + /** + * Ties an original object together with a working copy. + * + * @return {@code true} if original object not already registered. + */ + @SuppressWarnings("UnusedReturnValue") + public synchronized boolean invertRegister(final T workingCopy, final T objectToStore) + { + return this.registerInternal(objectToStore, workingCopy); + } + + /** + * Ties a working copy together with an original object. + * + * @return {@code true} if working copy is not already registered. + */ + @SuppressWarnings("UnusedReturnValue") + public synchronized boolean register(final T workingCopyToRegister, final T orginalObject) + { + return this.registerInternal(workingCopyToRegister, orginalObject); + } + + private synchronized boolean registerInternal(final T keyObject, final T valueObject) + { + if(keyObject.getClass() != valueObject.getClass()) + { + throw new DifferentClassesException("There is a critical error creating a working copy."); + } + if(this.currentWorkingCopies.containsKey(keyObject)) + { + return false; + } + this.currentWorkingCopies.put(keyObject, valueObject); + if(LOG.isTraceEnabled()) + { + LOG.trace( + "Registered a object of class {}. Registered objects: {}", + valueObject.getClass(), + this.currentWorkingCopies.size()); + } + return true; + } + + @SuppressWarnings("unchecked") + public synchronized T getOriginalObjectFromWorkingCopy(final T working) + { + return (T)this.currentWorkingCopies.get(working); + } + + public synchronized void deregister(final Object workingCopyToDeregister) + { + this.currentWorkingCopies.remove(workingCopyToDeregister); + + if(LOG.isTraceEnabled()) + { + LOG.trace( + "Deregistered a object of class {}. Registered objects: {}", + workingCopyToDeregister.getClass(), + this.currentWorkingCopies.size()); + } + } + + public synchronized void reset() + { + this.currentWorkingCopies = new IdentityHashMap<>(); + + if(LOG.isTraceEnabled()) + { + LOG.trace("Cleared WorkingCopyRegistry"); + } + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/AccessHelper.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/AccessHelper.java new file mode 100644 index 00000000..f5a2a18a --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/AccessHelper.java @@ -0,0 +1,114 @@ +/* + * Copyright © 2023 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.repository.access; + +import java.lang.reflect.Field; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import software.xdev.spring.data.eclipse.store.exceptions.FieldAccessReflectionException; +import software.xdev.spring.data.eclipse.store.repository.access.modifier.FieldAccessModifier; +import software.xdev.spring.data.eclipse.store.util.StringUtil; + + +/** + * Helps finding and handling {@link Field}s. + */ +public class AccessHelper +{ + private static final Logger LOG = LoggerFactory.getLogger(AccessHelper.class); + + private AccessHelper() + { + // Only static methods + } + + /** + * @param clazz where to look for fields. + * @return all the fields defined in the given class and all its parent classes. + */ + public static Map getInheritedPrivateFieldsByName(final Class clazz) + { + Objects.requireNonNull(clazz); + + final Map result = new HashMap<>(); + + Class i = clazz; + while(i != null && i != Object.class) + { + for(final Field field : i.getDeclaredFields()) + { + if(!field.isSynthetic()) + { + result.put(field.getName(), field); + } + } + i = i.getSuperclass(); + } + return result; + } + + /** + * @param clazz where the field is searched in. + * @param fieldName of the field that is searched in the class. + * @return Not only the field with a specific name in the given class but also finds the field if it is inherited + * from some parent class. + * @throws NoSuchFieldException if the field is not existing. It does not return {@code null} because this + * should not happen during production. + */ + public static Field getInheritedPrivateField(final Class clazz, final String fieldName) + throws NoSuchFieldException + { + Objects.requireNonNull(clazz); + StringUtil.requireNonNullAndNonBlank(fieldName); + + final Map inheritedPrivateFieldsByName = getInheritedPrivateFieldsByName(clazz); + if(LOG.isDebugEnabled()) + { + LOG.debug("Found {} fields in class {}.", inheritedPrivateFieldsByName.size(), clazz.getSimpleName()); + } + if(!inheritedPrivateFieldsByName.containsKey(fieldName)) + { + throw new NoSuchFieldException(String.format( + "Could not find field %s in class %s", + fieldName, + clazz.getSimpleName())); + } + return inheritedPrivateFieldsByName.get(fieldName); + } + + /** + * Makes the given field of the given object readable/accessible and returns its value. After reading the value the + * field is made unreadable/inaccessible again (if it was unreadable before). + */ + public static Object readFieldVariable(final Field field, final T sourceObject) + { + try(final FieldAccessModifier fieldAccessModifier = FieldAccessModifier.makeFieldReadable( + Objects.requireNonNull(field), + Objects.requireNonNull(sourceObject))) + { + return fieldAccessModifier.getValueOfField(sourceObject); + } + catch(final Exception e) + { + throw new FieldAccessReflectionException(field, e); + } + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldAccessModifier.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldAccessModifier.java new file mode 100644 index 00000000..3021c7f8 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldAccessModifier.java @@ -0,0 +1,40 @@ +/* + * Copyright © 2023 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.repository.access.modifier; + +import java.lang.reflect.Field; +import java.util.Objects; + + +/** + * Provides a way to open member variables (fields) to changes. + */ +public interface FieldAccessModifier extends AutoCloseable +{ + static FieldAccessModifierToEditable makeFieldEditable(final Field field, final T sourceObject) + { + return new FieldEditableMakerForJavaLowerThan18<>( + Objects.requireNonNull(field), + Objects.requireNonNull(sourceObject)); + } + + static FieldAccessModifier makeFieldReadable(final Field field, final T sourceObject) + { + return new FieldAccessibleMaker<>(Objects.requireNonNull(field), Objects.requireNonNull(sourceObject)); + } + + Object getValueOfField(E objectOfFieldToRead) throws IllegalAccessException; +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldAccessModifierToEditable.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldAccessModifierToEditable.java new file mode 100644 index 00000000..dd102ed1 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldAccessModifierToEditable.java @@ -0,0 +1,24 @@ +/* + * Copyright © 2023 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.repository.access.modifier; + +/** + * Provides a way to open member variables (fields) to changes. + */ +public interface FieldAccessModifierToEditable extends FieldAccessModifier +{ + void writeValueOfField(E objectOfFieldToWriteTo, Object valueToWrite) throws IllegalAccessException; +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldAccessibleMaker.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldAccessibleMaker.java new file mode 100644 index 00000000..44356496 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldAccessibleMaker.java @@ -0,0 +1,78 @@ +/* + * Copyright © 2023 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.repository.access.modifier; + +import java.lang.reflect.Field; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +/** + * {@link Field}s are made readable with this class. Should be created through {@link FieldAccessModifier}. + *

+ * Can be used like this because it is {@link AutoCloseable}: + * + * try(final FieldAccessModifier fem = FieldAccessModifier.makeFieldReadable(field,sourceObject))
{
// Read + * the data from the field.
}
+ *
+ */ +@SuppressWarnings("java:S3011") +public class FieldAccessibleMaker implements FieldAccessModifier +{ + private static final Logger LOG = LoggerFactory.getLogger(FieldAccessibleMaker.class); + private final Field field; + private final boolean wasAccessible; + + FieldAccessibleMaker(final Field field, final E sourceObject) + { + this.field = field; + this.wasAccessible = field.canAccess(sourceObject); + if(!this.wasAccessible) + { + if(LOG.isTraceEnabled()) + { + LOG.trace( + "Make field {}#{} accessible.", + this.field.getDeclaringClass().getSimpleName(), + this.field.getName()); + } + this.field.setAccessible(true); + } + } + + @Override + public Object getValueOfField(final E objectOfFieldToRead) throws IllegalAccessException + { + return this.field.get(objectOfFieldToRead); + } + + @Override + public void close() + { + if(!this.wasAccessible) + { + if(LOG.isTraceEnabled()) + { + LOG.trace( + "Make field {}#{} inaccessible.", + this.field.getDeclaringClass().getSimpleName(), + this.field.getName()); + } + this.field.setAccessible(false); + } + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldEditableMakerForJavaLowerThan18.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldEditableMakerForJavaLowerThan18.java new file mode 100644 index 00000000..6d81184d --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldEditableMakerForJavaLowerThan18.java @@ -0,0 +1,124 @@ +/* + * Copyright © 2023 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.repository.access.modifier; + +import java.lang.invoke.MethodHandles; +import java.lang.invoke.VarHandle; +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; +import java.util.Objects; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import software.xdev.spring.data.eclipse.store.exceptions.FieldAccessReflectionException; + + +/** + * {@link Field}s are made modifiable/editable with this class. Should be created through + * {@link FieldAccessModifier}. + *

+ * Can be used like this because it is {@link AutoCloseable}: + *

+ * + * try(final FieldAccessModifier fem = FieldAccessModifier.makeFieldEditable(field,sourceObject))
{
// Do + * something with the field.
}
+ *
+ *

+ * This is a quite shaky way to make final variables "unfinal". Should work for java versions lower than 18. + *

+ * https://stackoverflow.com/a/56043252/2351407 + */ +@SuppressWarnings("java:S3011") +public class FieldEditableMakerForJavaLowerThan18 implements FieldAccessModifierToEditable +{ + private static final Logger LOG = LoggerFactory.getLogger(FieldEditableMakerForJavaLowerThan18.class); + private static final VarHandle MODIFIERS; + + static + { + try + { + final var lookup = MethodHandles.privateLookupIn(Field.class, MethodHandles.lookup()); + MODIFIERS = lookup.findVarHandle(Field.class, "modifiers", int.class); + } + catch(final IllegalAccessException | NoSuchFieldException ex) + { + throw new FieldAccessReflectionException( + "Can't find modifiers in Fields. Please check if you're using a java version lower than 18.", + ex); + } + } + + private final Field field; + private final boolean wasFinal; + private final boolean wasAccessible; + + FieldEditableMakerForJavaLowerThan18(final Field field, final E sourceObject) + { + this.field = Objects.requireNonNull(field); + final int fieldModifiers = field.getModifiers(); + this.wasAccessible = field.canAccess(Objects.requireNonNull(sourceObject)); + this.wasFinal = Modifier.isFinal(fieldModifiers); + this.startMakingEditable(); + } + + private void startMakingEditable() + { + this.field.setAccessible(true); + if(!this.wasFinal) + { + if(LOG.isTraceEnabled()) + { + LOG.trace( + "Make field {}#{} editable.", + this.field.getDeclaringClass().getSimpleName(), + this.field.getName()); + } + MODIFIERS.set(this.field, this.field.getModifiers() & ~Modifier.FINAL); + } + } + + @Override + public void close() + { + if(!this.wasFinal) + { + if(LOG.isTraceEnabled()) + { + LOG.trace( + "Make field {}#{} immutable.", + this.field.getDeclaringClass().getSimpleName(), + this.field.getName()); + } + MODIFIERS.set(this.field, this.field.getModifiers() | Modifier.FINAL); + } + this.field.setAccessible(this.wasAccessible); + } + + @Override + public Object getValueOfField(final E objectOfFieldToRead) throws IllegalAccessException + { + return this.field.get(objectOfFieldToRead); + } + + @Override + public void writeValueOfField(final E objectOfFieldToWriteTo, final Object valueToWrite) + throws IllegalAccessException + { + this.field.set(objectOfFieldToWriteTo, valueToWrite); + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/config/EclipseStoreRepositoriesRegistrar.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/config/EclipseStoreRepositoriesRegistrar.java new file mode 100644 index 00000000..5caeb6b7 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/config/EclipseStoreRepositoriesRegistrar.java @@ -0,0 +1,46 @@ +/* + * Copyright © 2023 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.repository.config; + +import java.lang.annotation.Annotation; + +import org.springframework.context.annotation.ImportBeanDefinitionRegistrar; +import org.springframework.data.repository.config.RepositoryBeanDefinitionRegistrarSupport; +import org.springframework.data.repository.config.RepositoryConfigurationExtension; + +import jakarta.annotation.Nonnull; + + +/** + * Enables EclipseStore repositories and adds the {@link EclipseStoreRepositoryConfigurationExtension}. + * EclipseStore-specific {@link ImportBeanDefinitionRegistrar}. + */ +class EclipseStoreRepositoriesRegistrar extends RepositoryBeanDefinitionRegistrarSupport +{ + @Override + @Nonnull + protected Class getAnnotation() + { + return EnableEclipseStoreRepositories.class; + } + + @Override + @Nonnull + protected RepositoryConfigurationExtension getExtension() + { + return new EclipseStoreRepositoryConfigurationExtension(); + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/config/EclipseStoreRepositoryConfigNamespaceHandler.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/config/EclipseStoreRepositoryConfigNamespaceHandler.java new file mode 100644 index 00000000..61f3f770 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/config/EclipseStoreRepositoryConfigNamespaceHandler.java @@ -0,0 +1,37 @@ +/* + * Copyright © 2023 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.repository.config; + +import org.springframework.beans.factory.xml.NamespaceHandlerSupport; +import org.springframework.data.repository.config.RepositoryBeanDefinitionParser; +import org.springframework.data.repository.config.RepositoryConfigurationExtension; + + +/** + * Registeres the {@link EclipseStoreRepositoryConfigurationExtension} for "repositories". + */ +public class EclipseStoreRepositoryConfigNamespaceHandler extends NamespaceHandlerSupport +{ + @Override + public void init() + { + final RepositoryConfigurationExtension extension = new EclipseStoreRepositoryConfigurationExtension(); + final RepositoryBeanDefinitionParser repositoryBeanDefinitionParser = + new RepositoryBeanDefinitionParser(extension); + + this.registerBeanDefinitionParser("repositories", repositoryBeanDefinitionParser); + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/config/EclipseStoreRepositoryConfigurationExtension.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/config/EclipseStoreRepositoryConfigurationExtension.java new file mode 100644 index 00000000..6e55ffd3 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/config/EclipseStoreRepositoryConfigurationExtension.java @@ -0,0 +1,76 @@ +/* + * Copyright © 2023 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.repository.config; + +import java.lang.annotation.Annotation; +import java.util.Collection; +import java.util.Collections; + +import org.springframework.data.repository.config.RepositoryConfigurationExtension; +import org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport; + +import jakarta.annotation.Nonnull; +import software.xdev.spring.data.eclipse.store.repository.EclipseStoreRepository; +import software.xdev.spring.data.eclipse.store.repository.support.EclipseStoreRepositoryFactoryBean; + + +/** + * {@link RepositoryConfigurationExtension} for EclipseStore. + */ +public class EclipseStoreRepositoryConfigurationExtension extends RepositoryConfigurationExtensionSupport +{ + @Override + @Nonnull + public String getModuleName() + { + return "EclipseStoreDatastore"; + } + + @Override + @Nonnull + public String getModulePrefix() + { + return "EclipseStore"; + } + + @Override + @Nonnull + public String getRepositoryFactoryBeanClassName() + { + return EclipseStoreRepositoryFactoryBean.class.getName(); + } + + @Override + @Nonnull + public String getModuleIdentifier() + { + return this.getModulePrefix(); + } + + @Override + @Nonnull + public Collection> getIdentifyingAnnotations() + { + return Collections.emptyList(); + } + + @Override + @Nonnull + protected Collection> getIdentifyingTypes() + { + return Collections.singleton(EclipseStoreRepository.class); + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/config/EnableEclipseStoreRepositories.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/config/EnableEclipseStoreRepositories.java new file mode 100644 index 00000000..5786514b --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/config/EnableEclipseStoreRepositories.java @@ -0,0 +1,187 @@ +/* + * Copyright © 2023 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.repository.config; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Inherited; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +import org.springframework.beans.factory.FactoryBean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.ComponentScan.Filter; +import org.springframework.context.annotation.Import; +import org.springframework.data.repository.config.DefaultRepositoryBaseClass; +import org.springframework.data.repository.query.QueryLookupStrategy; +import org.springframework.data.repository.query.QueryLookupStrategy.Key; + +import software.xdev.spring.data.eclipse.store.repository.support.EclipseStoreRepositoryFactoryBean; + + +/** + * Enables the user to enable EclipseStore and configure it to some extent. + *

+ * Currently no configuration is possible! + *

+ */ +@SuppressWarnings("unused") +@Target(ElementType.TYPE) +@Retention(RetentionPolicy.RUNTIME) +@Documented +@Inherited +@Import(EclipseStoreRepositoriesRegistrar.class) +@ComponentScan({ + "software.xdev.spring.data.eclipse.store.repository", + "org.eclipse.store.integrations.spring.boot.types"}) +public @interface EnableEclipseStoreRepositories +{ + + /** + * Alias for the {@link #basePackages()} attribute. Allows for more concise annotation declarations e.g.: + * {@code @EnableEclipseStoreRepositories("org.my.pkg")} instead of + * {@code @EnableEclipseStoreRepositories(basePackages="org.my.pkg")}. + *

+ * This currently does nothing! Must get implemented in the future. TODO + *

+ */ + String[] value() default {}; + + /** + * Base packages to scan for annotated components. {@link #value()} is an alias for (and mutually exclusive with) + * this attribute. Use {@link #basePackageClasses()} for a type-safe alternative to String-based package names. + *

+ * This currently does nothing! Must get implemented in the future. TODO + *

+ */ + String[] basePackages() default {}; + + /** + * Type-safe alternative to {@link #basePackages()} for specifying the packages to scan for annotated components. + * The package of each class specified will be scanned. Consider creating a special no-op marker class or interface + * in each package that serves no purpose other than being referenced by this attribute. + *

+ * This currently does nothing! Must get implemented in the future. TODO + *

+ */ + Class[] basePackageClasses() default {}; + + /** + * Specifies which types are eligible for component scanning. Narrows the set of candidate components from + * everything in {@link #basePackages()} to everything in the base packages that matches the given filter or + *

+ * This currently does nothing! Must get implemented in the future. TODO + *

+ * filters. + */ + Filter[] includeFilters() default {}; + + /** + * Specifies which types are not eligible for component scanning. + *

+ * This currently does nothing! Must get implemented in the future. TODO + *

+ */ + Filter[] excludeFilters() default {}; + + /** + * Returns the postfix to be used when looking up custom repository implementations. Defaults to {@literal Impl} . + * So for a repository named {@code PersonRepository} the corresponding implementation class will be looked up + * scanning for {@code PersonRepositoryImpl}. + *

+ * This currently does nothing! Must get implemented in the future. TODO + *

+ * + * @return {@literal Impl} by default. + */ + String repositoryImplementationPostfix() default "Impl"; + + /** + * Configures the location of where to find the Spring Data named queries properties file. Will default to + * {@code META-INFO/eclipse-store-named-queries.properties}. + *

+ * This currently does nothing! Must get implemented in the future. TODO + *

+ * + * @return empty {@link String} by default. + */ + String namedQueriesLocation() default ""; + + /** + * Returns the key of the {@link QueryLookupStrategy} to be used for lookup queries for query methods. Defaults to + * {@link Key#CREATE_IF_NOT_FOUND}. + *

+ * This currently does nothing! Must get implemented in the future. TODO + *

+ * + * @return {@link Key#CREATE_IF_NOT_FOUND} by default. + */ + Key queryLookupStrategy() default Key.CREATE_IF_NOT_FOUND; + + /** + * Returns the {@link FactoryBean} class to be used for each repository instance. Defaults to + * {@link EclipseStoreRepositoryFactoryBean}. + *

+ * This currently does nothing! Must get implemented in the future. TODO + *

+ * + * @return {@link EclipseStoreRepositoryFactoryBean} by default. + */ + Class repositoryFactoryBeanClass() default EclipseStoreRepositoryFactoryBean.class; + + /** + * Configure the repository base class to be used to create repository proxies for this particular configuration. + *

+ * This currently does nothing! Must get implemented in the future. TODO + *

+ * + * @return {@link DefaultRepositoryBaseClass} by default. + * @since 1.8 + */ + Class repositoryBaseClass() default DefaultRepositoryBaseClass.class; + + /** + * Configures the name of the EclipseStoreTemplate bean to be used with the repositories detected. + *

+ * This currently does nothing! Must get implemented in the future. TODO + *

+ * + * @return {@literal eclipse-storeTemplate} by default. + */ + String eclipseStoreTemplateRef() default "eclipseStoreTemplate"; + + /** + * Whether to automatically create indexes for query methods defined in the repository interface. + *

+ * This currently does nothing! Must get implemented in the future. TODO + *

+ * + * @return {@literal false} by default. + */ + boolean createIndexesForQueryMethods() default false; + + /** + * Configures whether nested repository-interfaces (e.g. defined as inner classes) should be discovered by the + * repositories infrastructure. + *

+ * This currently does nothing! Must get implemented in the future. TODO + *

+ * + * @return {@literal false} by default. + */ + boolean considerNestedRepositories() default false; +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/EclipseStoreQueryCreator.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/EclipseStoreQueryCreator.java new file mode 100644 index 00000000..fb685694 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/EclipseStoreQueryCreator.java @@ -0,0 +1,264 @@ +/* + * Copyright © 2023 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.repository.query; + +import java.util.Collection; +import java.util.Iterator; +import java.util.Objects; + +import org.springframework.data.domain.Sort; +import org.springframework.data.repository.query.ParameterAccessor; +import org.springframework.data.repository.query.parser.AbstractQueryCreator; +import org.springframework.data.repository.query.parser.Part; +import org.springframework.data.repository.query.parser.PartTree; +import org.springframework.data.util.Streamable; +import org.springframework.data.util.TypeInformation; +import org.springframework.util.ObjectUtils; + +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import software.xdev.spring.data.eclipse.store.exceptions.FieldAccessReflectionException; +import software.xdev.spring.data.eclipse.store.repository.access.AccessHelper; +import software.xdev.spring.data.eclipse.store.repository.query.criteria.AbstractCriteriaNode; +import software.xdev.spring.data.eclipse.store.repository.query.criteria.Criteria; +import software.xdev.spring.data.eclipse.store.repository.query.criteria.CriteriaSingleNode; +import software.xdev.spring.data.eclipse.store.repository.query.executors.QueryExecutor; +import software.xdev.spring.data.eclipse.store.repository.query.executors.QueryExecutorCreator; +import software.xdev.spring.data.eclipse.store.repository.support.copier.working.WorkingCopier; + + +/** + * Creates an {@link QueryExecutor} according to the given {@link PartTree}. This is done by building a tree with + * {@link AbstractCriteriaNode}s. Only the root of the tree is returned and therefore evaluated. + * + * @param of entities that are queried + */ +@Nonnull +public class EclipseStoreQueryCreator extends AbstractQueryCreator, AbstractCriteriaNode> +{ + private final TypeInformation typeInformation; + private final Class domainClass; + private final WorkingCopier copier; + + public EclipseStoreQueryCreator( + final Class domainClass, + final TypeInformation typeInformation, + final WorkingCopier copier, + final PartTree tree, + final ParameterAccessor parameters) + { + super(tree, parameters); + this.domainClass = Objects.requireNonNull(domainClass); + this.typeInformation = Objects.requireNonNull(typeInformation); + this.copier = Objects.requireNonNull(copier); + } + + @Override + @Nonnull + protected AbstractCriteriaNode create(@Nonnull final Part part, @Nonnull final Iterator iterator) + { + Objects.requireNonNull(part); + Objects.requireNonNull(iterator); + return this.from(part, new CriteriaSingleNode<>(this.getDeclaredField(part)), iterator); + } + + @Override + @Nonnull + protected AbstractCriteriaNode and( + @Nonnull final Part part, + @Nullable final AbstractCriteriaNode base, + @Nonnull final Iterator iterator) + { + Objects.requireNonNull(part); + Objects.requireNonNull(iterator); + if(base == null) + { + return this.create(part, iterator); + } + + return this.from(part, base.and(this.getDeclaredField(part)), iterator); + } + + @Override + @Nonnull + protected AbstractCriteriaNode or( + @Nonnull final AbstractCriteriaNode base, + @Nonnull final AbstractCriteriaNode criteria) + { + Objects.requireNonNull(base); + Objects.requireNonNull(criteria); + return base.orOperator(criteria); + } + + @Override + @Nonnull + protected QueryExecutor complete(final AbstractCriteriaNode criteria, @Nonnull final Sort sort) + { + Objects.requireNonNull(sort); + if(criteria == null) + { + return QueryExecutorCreator.createQuery( + this.typeInformation, + this.copier, + Criteria.createNoCriteria(), + sort); + } + return QueryExecutorCreator.createQuery(this.typeInformation, this.copier, criteria, sort); + } + + private AbstractCriteriaNode from( + final Part part, + final AbstractCriteriaNode criteria, + @Nullable final Iterator parameters) + { + Objects.requireNonNull(criteria); + final Part.Type type = Objects.requireNonNull(part).getType(); + + switch(type) + { + case AFTER, GREATER_THAN -> + { + return criteria.gt(Objects.requireNonNull(parameters).next()); + } + case GREATER_THAN_EQUAL -> + { + return criteria.gte(Objects.requireNonNull(parameters).next()); + } + case BEFORE, LESS_THAN -> + { + return criteria.lt(Objects.requireNonNull(parameters).next()); + } + case LESS_THAN_EQUAL -> + { + return criteria.lte(Objects.requireNonNull(parameters).next()); + } + case BETWEEN -> + { + return criteria.between( + Objects.requireNonNull(parameters).next(), + Objects.requireNonNull(parameters).next()); + } + case IS_NOT_NULL -> + { + return criteria.ne(null); + } + case IS_NULL -> + { + return criteria.is(null); + } + case NOT_IN -> + { + return criteria.nin(this.asStreamable(Objects.requireNonNull(parameters).next())); + } + case IN -> + { + return criteria.in(this.asStreamable(Objects.requireNonNull(parameters).next())); + } + case LIKE -> + { + return criteria.like((String)Objects.requireNonNull(parameters).next()); + } + case STARTING_WITH -> + { + return criteria.startWith((String)Objects.requireNonNull(parameters).next()); + } + case ENDING_WITH -> + { + return criteria.endWith((String)Objects.requireNonNull(parameters).next()); + } + case CONTAINING -> + { + return criteria.containing((String)Objects.requireNonNull(parameters).next()); + } + case NOT_LIKE -> + { + return criteria.notLike((String)Objects.requireNonNull(parameters).next()); + } + case NOT_CONTAINING -> + { + return criteria.notContaining((String)Objects.requireNonNull(parameters).next()); + } + case EXISTS -> + { + return criteria.exists((Boolean)Objects.requireNonNull(parameters).next()); + } + case TRUE -> + { + return criteria.is(true); + } + case FALSE -> + { + return criteria.is(false); + } + case SIMPLE_PROPERTY -> + { + if(this.isSimpleComparisonPossible(part)) + { + return criteria.is(Objects.requireNonNull(parameters).next()); + } + } + case NEGATING_SIMPLE_PROPERTY -> + { + if(this.isSimpleComparisonPossible(part)) + { + return criteria.ne(Objects.requireNonNull(parameters).next()); + } + } + default -> throw new IllegalArgumentException("Unsupported keyword"); + } + throw new IllegalArgumentException("Unsupported keyword"); + } + + private Streamable asStreamable(final Object value) + { + + if(value instanceof final Collection collection) + { + return Streamable.of(collection); + } + else if(ObjectUtils.isArray(value)) + { + return Streamable.of((Object[])value); + } + return Streamable.of(value); + } + + private boolean isSimpleComparisonPossible(final Part part) + { + return switch(part.shouldIgnoreCase()) + { + case NEVER -> true; + case WHEN_POSSIBLE -> part.getProperty().getType() != String.class; + case ALWAYS -> false; + }; + } + + private ReflectedField getDeclaredField(final Part part) + { + final String fieldName = part.getProperty().getSegment(); + try + { + return new ReflectedField<>(AccessHelper.getInheritedPrivateField(this.domainClass, fieldName)); + } + catch(final NoSuchFieldException e) + { + throw new FieldAccessReflectionException(String.format( + "Field %s in class %s was not found!", + fieldName, + this.domainClass.getSimpleName()), e); + } + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/FindAllEclipseStoreQueryProvider.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/FindAllEclipseStoreQueryProvider.java new file mode 100644 index 00000000..77e2de71 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/FindAllEclipseStoreQueryProvider.java @@ -0,0 +1,90 @@ +/* + * Copyright © 2023 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.repository.query; + +import java.lang.reflect.Method; + +import org.springframework.data.repository.query.QueryMethod; +import org.springframework.data.repository.query.RepositoryQuery; +import org.springframework.data.util.TypeInformation; + +import jakarta.annotation.Nonnull; +import software.xdev.spring.data.eclipse.store.repository.EntityListProvider; +import software.xdev.spring.data.eclipse.store.repository.Query; +import software.xdev.spring.data.eclipse.store.repository.query.criteria.Criteria; +import software.xdev.spring.data.eclipse.store.repository.query.executors.QueryExecutor; +import software.xdev.spring.data.eclipse.store.repository.query.executors.QueryExecutorCreator; +import software.xdev.spring.data.eclipse.store.repository.support.copier.working.WorkingCopier; + + +/** + * Creates queries for specific entities with "findAll" and executes them through the + * {@link QueryExecutor}. + *

+ * Is needed for special use if {@link Query} is used with + * {@code findAll}. + *

+ * + * @param entity type to create query for + */ +public class FindAllEclipseStoreQueryProvider implements RepositoryQuery +{ + private final EntityListProvider entityListProvider; + private final Class domainClass; + private final TypeInformation typeInformation; + private final WorkingCopier copier; + private final QueryMethod queryMethod; + + public FindAllEclipseStoreQueryProvider( + final QueryMethod queryMethod, + final Method method, + final Class domainClass, + final EntityListProvider entityListProvider, + final WorkingCopier copier) + { + this.queryMethod = queryMethod; + this.domainClass = domainClass; + this.entityListProvider = entityListProvider; + this.typeInformation = TypeInformation.fromReturnTypeOf(method); + this.copier = copier; + } + + /** + * {@inheritDoc} + *

+ * Creates a new {@link EclipseStoreQueryCreator} and executes it with empty criteria. + *

+ * + * @param values must not be {@literal null}. + * @return queried entities/entity wrapped in the correct class depending on the {@link #typeInformation} + */ + @Override + @Nonnull + public Object execute(@Nonnull final Object[] values) + { + return + QueryExecutorCreator + .createQuery(this.typeInformation, this.copier, Criteria.createNoCriteria(), null) + .execute(this.domainClass, this.entityListProvider.getEntityList(this.domainClass), values); + } + + @Override + @Nonnull + public QueryMethod getQueryMethod() + { + return this.queryMethod; + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/ReflectedField.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/ReflectedField.java new file mode 100644 index 00000000..f3ece752 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/ReflectedField.java @@ -0,0 +1,53 @@ +/* + * Copyright © 2023 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.repository.query; + +import java.lang.reflect.Field; +import java.util.Objects; + +import jakarta.annotation.Nonnull; +import software.xdev.spring.data.eclipse.store.repository.access.AccessHelper; + + +/** + * Simple wrapper for a field to make it easily readable. If the fields is not accessible, it is made accessible with + * the {@link AccessHelper#readFieldVariable(Field, Object)}. + * + * @param Input + * @param Value + */ +public class ReflectedField +{ + private final Field field; + + public ReflectedField(final Field field) + { + this.field = Objects.requireNonNull(field); + } + + /** + * Reads the field of the given object. If the fields is not accessible, it is made accessible with the + * {@link AccessHelper#readFieldVariable(Field, Object)}. + * + * @param object to read the field of + * @return value of the field in the given object. + */ + @SuppressWarnings("unchecked") + public E readValue(@Nonnull final T object) + { + return (E)AccessHelper.readFieldVariable(Objects.requireNonNull(this.field), Objects.requireNonNull(object)); + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/StringBasedEclipseStoreQueryProvider.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/StringBasedEclipseStoreQueryProvider.java new file mode 100644 index 00000000..9fdfd8ca --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/StringBasedEclipseStoreQueryProvider.java @@ -0,0 +1,107 @@ +/* + * Copyright © 2023 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.repository.query; + +import java.lang.reflect.Method; +import java.util.Objects; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.data.repository.query.Parameters; +import org.springframework.data.repository.query.ParametersParameterAccessor; +import org.springframework.data.repository.query.QueryMethod; +import org.springframework.data.repository.query.RepositoryQuery; +import org.springframework.data.repository.query.parser.PartTree; +import org.springframework.data.util.TypeInformation; + +import jakarta.annotation.Nonnull; +import software.xdev.spring.data.eclipse.store.repository.EntityListProvider; +import software.xdev.spring.data.eclipse.store.repository.query.executors.QueryExecutor; +import software.xdev.spring.data.eclipse.store.repository.support.copier.working.WorkingCopier; + + +/** + * Creates queries for specific entities and executes them through the + * {@link QueryExecutor}. + * + * @param entity type to create query for + */ +public class StringBasedEclipseStoreQueryProvider implements RepositoryQuery +{ + private static final Logger LOG = LoggerFactory.getLogger(StringBasedEclipseStoreQueryProvider.class); + private final PartTree tree; + private final Parameters parameters; + private final EntityListProvider entityListProvider; + private final Class domainClass; + private final TypeInformation typeInformation; + private final WorkingCopier copier; + private final QueryMethod queryMethod; + + public StringBasedEclipseStoreQueryProvider( + final QueryMethod queryMethod, + final Method method, + final Class domainClass, + final EntityListProvider entityListProvider, + final WorkingCopier copier) + { + Objects.requireNonNull(method); + this.queryMethod = queryMethod; + this.domainClass = Objects.requireNonNull(domainClass); + this.entityListProvider = Objects.requireNonNull(entityListProvider); + this.tree = new PartTree(method.getName(), domainClass); + this.typeInformation = TypeInformation.fromReturnTypeOf(method); + this.parameters = queryMethod.getParameters(); + this.copier = Objects.requireNonNull(copier); + } + + /** + * {@inheritDoc} + *

+ * Creates a new {@link EclipseStoreQueryCreator} and executes it with given values. + *

+ * + * @param values must not be {@literal null}. + * @return queried entities/entity wrapped in the correct class depending on the {@link #typeInformation} + */ + @Override + @Nonnull + public Object execute(@Nonnull final Object[] values) + { + Objects.requireNonNull(values); + final ParametersParameterAccessor accessor = new ParametersParameterAccessor(this.parameters, values); + final EclipseStoreQueryCreator creator = + new EclipseStoreQueryCreator<>(this.domainClass, this.typeInformation, this.copier, this.tree, accessor); + + if(LOG.isDebugEnabled()) + { + LOG.debug("Executing query {}...", this.queryMethod); + } + final Object result = creator.createQuery() + .execute(this.domainClass, this.entityListProvider.getEntityList(this.domainClass), values); + if(LOG.isDebugEnabled()) + { + LOG.debug("Done executing query {}.", this.queryMethod); + } + return result; + } + + @Override + @Nonnull + public QueryMethod getQueryMethod() + { + return this.queryMethod; + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/criteria/AbstractCriteriaNode.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/criteria/AbstractCriteriaNode.java new file mode 100644 index 00000000..f8290fa7 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/criteria/AbstractCriteriaNode.java @@ -0,0 +1,197 @@ +/* + * Copyright © 2023 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.repository.query.criteria; + +import java.util.LinkedHashSet; +import java.util.Objects; +import java.util.function.Predicate; + +import org.springframework.data.util.Streamable; +import org.springframework.lang.Nullable; + +import software.xdev.spring.data.eclipse.store.repository.query.ReflectedField; +import software.xdev.spring.data.eclipse.store.util.GenericObjectComparer; + + +/** + * Criteria to apply to an entity and check if the criteria is fulfilled or not. + * + * @param entity-type to apply the criteria to. + */ +public abstract class AbstractCriteriaNode implements Criteria +{ + private final ReflectedField field; + final LinkedHashSet> predicates = new LinkedHashSet<>(); + + protected AbstractCriteriaNode(@Nullable final ReflectedField field) + { + this.field = field; + } + + public AbstractCriteriaNode and(final ReflectedField field) + { + return new CriteriaAndNode<>( + this, + Objects.requireNonNull(field)); + } + + public AbstractCriteriaNode orOperator(final AbstractCriteriaNode criteria) + { + Objects.requireNonNull(criteria); + return new CriteriaOrNode<>(this, criteria); + } + + public AbstractCriteriaNode is(@Nullable final Object value) + { + this.predicates.add(entity -> { + final Object fieldValue = Objects.requireNonNull(this.field).readValue(entity); + return Objects.equals(fieldValue, value); + }); + return this; + } + + public AbstractCriteriaNode ne(@Nullable final Object value) + { + this.predicates.add(entity -> { + final Object fieldValue = Objects.requireNonNull(this.field).readValue(entity); + return !Objects.equals(fieldValue, value); + }); + return this; + } + + public AbstractCriteriaNode lt(final Object value) + { + Objects.requireNonNull(value); + this.predicates.add(entity -> + GenericObjectComparer.isLessThan(Objects.requireNonNull(this.field).readValue(entity), value) + ); + return this; + } + + public AbstractCriteriaNode lte(final Object value) + { + Objects.requireNonNull(value); + this.predicates.add(entity -> GenericObjectComparer.isLessOrEqualTo(Objects.requireNonNull(this.field) + .readValue(entity), value)); + return this; + } + + public AbstractCriteriaNode gt(final Object value) + { + Objects.requireNonNull(value); + this.predicates.add(entity -> GenericObjectComparer.isGreaterThan(Objects.requireNonNull(this.field) + .readValue(entity), value)); + return this; + } + + public AbstractCriteriaNode gte(final Object value) + { + Objects.requireNonNull(value); + this.predicates.add(entity -> GenericObjectComparer.isGreaterOrEqualTo(Objects.requireNonNull(this.field) + .readValue(entity), value)); + return this; + } + + public AbstractCriteriaNode between(final Object minValue, final Object maxValue) + { + Objects.requireNonNull(minValue); + Objects.requireNonNull(maxValue); + this.predicates.add(entity -> { + final Object value = Objects.requireNonNull(this.field).readValue(entity); + return GenericObjectComparer.isLessOrEqualTo(value, maxValue) && + GenericObjectComparer.isGreaterOrEqualTo(value, minValue); + }); + return this; + } + + public AbstractCriteriaNode in(final Streamable values) + { + this.predicates.add(entity -> { + if(values == null) + { + return false; + } + return values.toSet().contains(Objects.requireNonNull(this.field).readValue(entity)); + }); + return this; + } + + public AbstractCriteriaNode nin(final Streamable values) + { + this.predicates.add(entity -> { + if(values == null) + { + return true; + } + return !values.toSet().contains(Objects.requireNonNull(this.field).readValue(entity)); + }); + return this; + } + + public AbstractCriteriaNode exists(final boolean value) + { + this.predicates.add(entity -> value == (Objects.requireNonNull(this.field).readValue(entity) != null)); + return this; + } + + public AbstractCriteriaNode like(final String like) + { + final String completeRegex = sqlLikeStringToRegex(like); + this.predicates.add(entity -> { + final String fieldValue = (String)Objects.requireNonNull(this.field).readValue(entity); + return fieldValue != null && fieldValue.toUpperCase().matches(completeRegex); + }); + return this; + } + + private static String sqlLikeStringToRegex(final String like) + { + String regex = like.toUpperCase(); + regex = regex.replace(".", "\\."); + regex = regex.replace("_", "."); + return regex.replace("%", ".*"); + } + + public AbstractCriteriaNode startWith(final String startString) + { + return this.like(startString + "%"); + } + + public AbstractCriteriaNode endWith(final String endString) + { + return this.like("%" + endString); + } + + public AbstractCriteriaNode containing(final String containedString) + { + return this.like("%" + containedString + "%"); + } + + public AbstractCriteriaNode notLike(final String notLikeString) + { + final String completeRegex = sqlLikeStringToRegex(notLikeString); + this.predicates.add(entity -> { + final String fieldValue = (String)Objects.requireNonNull(this.field).readValue(entity); + return fieldValue != null && !fieldValue.toUpperCase().matches(completeRegex); + }); + return this; + } + + public AbstractCriteriaNode notContaining(final String containedString) + { + return this.notLike("%" + containedString + "%"); + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/criteria/Criteria.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/criteria/Criteria.java new file mode 100644 index 00000000..1ea456cd --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/criteria/Criteria.java @@ -0,0 +1,43 @@ +/* + * Copyright © 2023 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.repository.query.criteria; + +import org.springframework.lang.Nullable; + +/** + * Criteria to apply to an entity and check if the criteria is fulfilled or not. + * + * @param entity-type to apply the criteria to. + */ +@FunctionalInterface +public interface Criteria +{ + /** + * Empty criteria which is always {@code true}. + */ + static Criteria createNoCriteria() + { + return object -> true; + } + + /** + * Checks the criteria against the given object. + * + * @param object to check the criteria against. + * @return {@code true} if the object is within the criteria, {@code false} if not. + */ + boolean evaluate(@Nullable final T object); +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/criteria/CriteriaAndNode.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/criteria/CriteriaAndNode.java new file mode 100644 index 00000000..adcf44b4 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/criteria/CriteriaAndNode.java @@ -0,0 +1,58 @@ +/* + * Copyright © 2023 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.repository.query.criteria; + +import java.util.function.Predicate; + +import org.springframework.lang.Nullable; + +import software.xdev.spring.data.eclipse.store.repository.query.ReflectedField; + + +/** + * {@inheritDoc} + *

+ * Evaluates to true if all it's own {@link #predicates} and {@link #childCriteria} is true. + */ +public class CriteriaAndNode extends AbstractCriteriaNode +{ + private final Criteria childCriteria; + + protected CriteriaAndNode(final Criteria childCriteria, @Nullable final ReflectedField field) + { + super(field); + this.childCriteria = childCriteria; + } + + /** + * {@inheritDoc} + *

+ * Checks all it's own {@link #predicates} and then evaluates it's {@link #childCriteria} + *

+ */ + @Override + public boolean evaluate(@Nullable final T object) + { + for(final Predicate predicate : this.predicates) + { + if(!predicate.test(object)) + { + return false; + } + } + return this.childCriteria.evaluate(object); + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/criteria/CriteriaOrNode.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/criteria/CriteriaOrNode.java new file mode 100644 index 00000000..d7e84dd9 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/criteria/CriteriaOrNode.java @@ -0,0 +1,56 @@ +/* + * Copyright © 2023 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.repository.query.criteria; + +import org.springframework.lang.Nullable; + + +/** + * {@inheritDoc} + *

+ * Evaluates to true if either the {@link #leftCriteria} or {@link #rightCriteria} is true. + */ +public class CriteriaOrNode extends AbstractCriteriaNode +{ + private final Criteria leftCriteria; + private final Criteria rightCriteria; + + protected CriteriaOrNode( + final Criteria leftCriteria, + final Criteria rightCriteria) + { + super(null); + this.leftCriteria = leftCriteria; + this.rightCriteria = rightCriteria; + } + + /** + * {@inheritDoc} + *

+ * Evaluates to true if either the {@link #leftCriteria} or + * {@link #rightCriteria} is true. + *

+ */ + @Override + public boolean evaluate(@Nullable final T object) + { + if(this.leftCriteria.evaluate(object)) + { + return true; + } + return this.rightCriteria.evaluate(object); + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/criteria/CriteriaSingleNode.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/criteria/CriteriaSingleNode.java new file mode 100644 index 00000000..e6eddeeb --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/criteria/CriteriaSingleNode.java @@ -0,0 +1,60 @@ +/* + * Copyright © 2023 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.repository.query.criteria; + +import java.util.function.Predicate; + +import org.springframework.lang.Nullable; + +import software.xdev.spring.data.eclipse.store.repository.query.ReflectedField; + + +/** + * {@inheritDoc} + *

+ * Evaluates to true if all it's own {@link #predicates} is true. + */ +public class CriteriaSingleNode extends AbstractCriteriaNode +{ + public CriteriaSingleNode() + { + super(null); + } + + public CriteriaSingleNode(final ReflectedField field) + { + super(field); + } + + /** + * {@inheritDoc} + *

+ * Checks all it's own {@link #predicates} + *

+ */ + @Override + public boolean evaluate(@Nullable final T object) + { + for(final Predicate predicate : this.predicates) + { + if(!predicate.test(object)) + { + return false; + } + } + return true; + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/EntitySorter.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/EntitySorter.java new file mode 100644 index 00000000..0e993467 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/EntitySorter.java @@ -0,0 +1,75 @@ +/* + * Copyright © 2023 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.repository.query.executors; + +import java.lang.reflect.Field; +import java.util.Comparator; +import java.util.stream.Stream; + +import org.springframework.data.domain.Sort; + +import software.xdev.spring.data.eclipse.store.exceptions.NotComparableException; +import software.xdev.spring.data.eclipse.store.repository.access.AccessHelper; +import software.xdev.spring.data.eclipse.store.util.GenericObjectComparer; + + +public class EntitySorter +{ + private EntitySorter() + { + // Only static methods + } + + public static Stream sortEntitiesStream(final Class clazz, final Sort sort, Stream entityStream) + { + if(sort != null) + { + for(final Sort.Order order : sort) + { + try + { + final Field fieldForOrder = + AccessHelper.getInheritedPrivateField(clazz, order.getProperty()); + final Comparator comparator = + EntitySorter.getComparator(fieldForOrder, order.getDirection()); + entityStream = entityStream.sorted(comparator); + } + catch(final NoSuchFieldException e) + { + throw new NotComparableException(String.format( + "Could not sort entities by property %s", + order.getProperty())); + } + } + } + return entityStream; + } + + private static Comparator getComparator(final Field fieldForOrder, final Sort.Direction direction) + { + return (e1, e2) -> { + final int result = GenericObjectComparer.compare( + AccessHelper.readFieldVariable(fieldForOrder, e1), + AccessHelper.readFieldVariable(fieldForOrder, e2) + ); + if(direction.isDescending()) + { + return result * -1; + } + return result; + }; + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/ListQueryExecutor.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/ListQueryExecutor.java new file mode 100644 index 00000000..3a9d13e8 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/ListQueryExecutor.java @@ -0,0 +1,75 @@ +/* + * Copyright © 2023 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.repository.query.executors; + +import java.util.Collection; +import java.util.List; +import java.util.Objects; + +import org.springframework.data.domain.Pageable; +import org.springframework.data.domain.Sort; + +import jakarta.annotation.Nullable; +import software.xdev.spring.data.eclipse.store.repository.query.criteria.Criteria; +import software.xdev.spring.data.eclipse.store.repository.support.copier.working.WorkingCopier; + + +/** + * Queries entities and returns a the result as list. + * + * @param Entity-Type to query + */ +public class ListQueryExecutor implements QueryExecutor +{ + private final PageableSortableCollectionQuerier querier; + + public ListQueryExecutor(final WorkingCopier copier, final Criteria criteria) + { + this.querier = new PageableSortableCollectionQuerier<>(copier, criteria); + } + + public ListQueryExecutor(final WorkingCopier copier, final Criteria criteria, final Sort sort) + { + this.querier = new PageableSortableCollectionQuerier<>(copier, criteria, sort); + } + + /** + * {@inheritDoc} + * + * @return a list of the found/sorted/paged entities + */ + @Override + public List execute(final Class clazz, @Nullable final Collection entities, final Object[] values) + { + Objects.requireNonNull(clazz); + if(entities == null || entities.isEmpty()) + { + return List.of(); + } + if(values != null && values.length > 0) + { + if(values[values.length - 1] instanceof final Pageable pageable) + { + return this.querier.getEntities(entities, pageable, clazz); + } + if(values[values.length - 1] instanceof final Sort sort) + { + return this.querier.getEntities(entities, clazz, sort); + } + } + return this.querier.getEntities(entities, clazz); + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/PageableQueryExecutor.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/PageableQueryExecutor.java new file mode 100644 index 00000000..cb4fe7ce --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/PageableQueryExecutor.java @@ -0,0 +1,74 @@ +/* + * Copyright © 2023 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.repository.query.executors; + +import java.util.Collection; +import java.util.Objects; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageImpl; +import org.springframework.data.domain.Pageable; +import org.springframework.data.domain.Sort; + +import jakarta.annotation.Nullable; +import software.xdev.spring.data.eclipse.store.exceptions.NoPageableObjectFoundException; +import software.xdev.spring.data.eclipse.store.repository.query.criteria.Criteria; +import software.xdev.spring.data.eclipse.store.repository.support.copier.working.WorkingCopier; + + +/** + * Queries entities and returns a the result as page. + * + * @param Entity-Type to query + */ +public class PageableQueryExecutor implements QueryExecutor +{ + private final PageableSortableCollectionQuerier querier; + + public PageableQueryExecutor(final WorkingCopier copier, final Criteria criteria, final Sort sort) + { + this.querier = new PageableSortableCollectionQuerier<>(copier, criteria, sort); + } + + /** + * {@inheritDoc} + * + * @return a page of the found/sorted/paged entities + */ + @Override + public Page execute(final Class clazz, @Nullable final Collection entities, final Object[] values) + { + Objects.requireNonNull(clazz); + + if(entities == null || entities.isEmpty()) + { + return Page.empty(); + } + if(values != null && values.length > 0) + { + if(values[values.length - 1] instanceof final Pageable pageable) + { + return new PageImpl<>(this.querier.getEntities(entities, pageable, clazz)); + } + if(values[values.length - 1] instanceof final Sort sort) + { + return new PageImpl<>(this.querier.getEntities(entities, clazz, sort)); + } + } + throw new NoPageableObjectFoundException( + "Could not execute query, because there is no Pageable or Sort object given."); + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/PageableSortableCollectionQuerier.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/PageableSortableCollectionQuerier.java new file mode 100644 index 00000000..012e4c7c --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/PageableSortableCollectionQuerier.java @@ -0,0 +1,127 @@ +/* + * Copyright © 2023 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.repository.query.executors; + +import java.util.Collection; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import java.util.stream.Stream; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.data.domain.Pageable; +import org.springframework.data.domain.Sort; + +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import software.xdev.spring.data.eclipse.store.repository.query.criteria.Criteria; +import software.xdev.spring.data.eclipse.store.repository.support.copier.working.WorkingCopier; + + +/** + * Executes queries that are optionally sorted and paged in collections. + **/ +public class PageableSortableCollectionQuerier +{ + private static final Logger LOG = LoggerFactory.getLogger(PageableSortableCollectionQuerier.class); + private final Criteria criteria; + private final WorkingCopier copier; + private final Optional staticSort; + + public PageableSortableCollectionQuerier(final WorkingCopier copier, final Criteria criteria) + { + this(copier, criteria, null); + } + + public PageableSortableCollectionQuerier( + final WorkingCopier copier, final Criteria criteria, + final Sort sort) + { + this.criteria = Objects.requireNonNull(criteria); + this.copier = Objects.requireNonNull(copier); + this.staticSort = Optional.ofNullable(sort); + } + + protected List getEntities( + @Nonnull final Collection entities, + @Nullable final Pageable pageable, + @Nullable final Class clazz, + @Nullable final Sort sort) + { + Objects.requireNonNull(entities); + + Stream entityStream = entities + .stream() + .filter(this.criteria::evaluate); + + final Sort sortToUse = this.staticSort.orElse(sort); + if(sortToUse != null) + { + entityStream = EntitySorter.sortEntitiesStream(clazz, sortToUse, entityStream); + } + + entityStream = this.pageEntityStream(pageable, entityStream); + + final List result = this.copyEntities(entityStream); + + if(LOG.isTraceEnabled()) + { + LOG.trace("Found {} entries.", result.size()); + } + return result; + } + + private List copyEntities(final Stream filteredEntityStream) + { + return filteredEntityStream + .map(this.copier::copy) + .toList(); + } + + private Stream pageEntityStream(final Pageable pageable, Stream entityStream) + { + if(pageable != null && pageable.isPaged()) + { + final long skipCount = pageable.getOffset(); + entityStream = entityStream + .skip(skipCount) + .limit(pageable.getPageSize()); + } + return entityStream; + } + + protected List getEntities( + final Collection entities, + final Pageable pageable, + final Class clazz) + { + return this.getEntities(entities, pageable, clazz, pageable.getSort()); + } + + protected List getEntities( + final Collection entities, + final Class clazz, + final Sort sort) + { + return this.getEntities(entities, null, clazz, sort); + } + + protected List getEntities(final Collection entities, final Class clazz) + { + return this.getEntities(entities, null, clazz, null); + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/QueryExecutor.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/QueryExecutor.java new file mode 100644 index 00000000..ebe92070 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/QueryExecutor.java @@ -0,0 +1,40 @@ +/* + * Copyright © 2023 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.repository.query.executors; + +import java.util.Collection; + + +/** + * Queries the actual entities from the original entities. + * + * @param Entity-Type to query + */ +public interface QueryExecutor +{ + /** + * Executes the created query over entities. + *

+ * The result is always a working copy of the entities. + *

+ * + * @param clazz of the entities + * @param entities where the query is executed on + * @param values for the query. These are values that might be compared to entities. + * @return entities/entity on which the conditions match. + */ + Object execute(Class clazz, final Collection entities, Object[] values); +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/QueryExecutorCreator.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/QueryExecutorCreator.java new file mode 100644 index 00000000..2667591a --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/QueryExecutorCreator.java @@ -0,0 +1,86 @@ +/* + * Copyright © 2023 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.repository.query.executors; + +import java.util.Optional; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Sort; +import org.springframework.data.util.TypeInformation; + +import software.xdev.spring.data.eclipse.store.repository.query.criteria.Criteria; +import software.xdev.spring.data.eclipse.store.repository.support.copier.working.WorkingCopier; + + +public class QueryExecutorCreator +{ + private static final Logger LOG = LoggerFactory.getLogger(QueryExecutorCreator.class); + + private QueryExecutorCreator() + { + // Only static methods + } + + /** + * Creates and returns Query-Executor. + * + * @param typeInformation about the query to create. + * @param copier that creates working copies of the found entities + * @param criteria to query for entities with specific criteria. Only if the criteria matches, entities are + * selected. + * @param sort the static sort that is possibly defined through the method name + * @param Entity-Type to query + * @return the correct Query-Executor according to the given parameters + */ + public static QueryExecutor createQuery( + final TypeInformation typeInformation, + final WorkingCopier copier, + final Criteria criteria, + final Sort sort) + { + if(typeInformation.isCollectionLike()) + { + if(typeInformation.getType().equals(Page.class)) + { + if(LOG.isDebugEnabled()) + { + LOG.debug("Create PageableQuery"); + } + return new PageableQueryExecutor<>(copier, criteria, sort); + } + if(LOG.isDebugEnabled()) + { + LOG.debug("Create ListQuery"); + } + return new ListQueryExecutor<>(copier, criteria, sort); + } + if(typeInformation.getType().equals(Optional.class)) + { + if(LOG.isDebugEnabled()) + { + LOG.debug("Create SingleOptionalQuery"); + } + return new SingleOptionalQueryExecutor<>(copier, criteria, sort); + } + if(LOG.isDebugEnabled()) + { + LOG.debug("Create SingleQuery"); + } + return new SingleQueryExecutor<>(copier, criteria, sort); + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/SingleOptionalQueryExecutor.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/SingleOptionalQueryExecutor.java new file mode 100644 index 00000000..eb06865b --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/SingleOptionalQueryExecutor.java @@ -0,0 +1,88 @@ +/* + * Copyright © 2023 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.repository.query.executors; + +import java.util.Collection; +import java.util.Objects; +import java.util.Optional; +import java.util.stream.Stream; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.data.domain.Sort; + +import jakarta.annotation.Nullable; +import software.xdev.spring.data.eclipse.store.repository.query.criteria.Criteria; +import software.xdev.spring.data.eclipse.store.repository.support.copier.working.WorkingCopier; + + +/** + * Queries entities and returns the result wrapped in an optional. + * + * @param Entity-Type to query + */ +public class SingleOptionalQueryExecutor implements QueryExecutor +{ + private static final Logger LOG = LoggerFactory.getLogger(SingleOptionalQueryExecutor.class); + private final Criteria criteria; + private final WorkingCopier copier; + private final Optional staticSort; + + public SingleOptionalQueryExecutor(final WorkingCopier copier, final Criteria criteria, final Sort sort) + { + this.criteria = Objects.requireNonNull(criteria); + this.copier = Objects.requireNonNull(copier); + this.staticSort = Optional.ofNullable(sort); + } + + /** + * {@inheritDoc} + * + * @return an optional with the found entity. {@link Optional#empty()} if nothing was found. + */ + @Override + public Optional execute( + final Class clazz, + @Nullable final Collection entities, + @Nullable final Object[] values) + { + Objects.requireNonNull(clazz); + if(entities == null || entities.isEmpty()) + { + return Optional.empty(); + } + Stream entityStream = entities + .stream() + .filter(this.criteria::evaluate) + .map(this.copier::copy); + + if(this.staticSort.isPresent()) + { + entityStream = EntitySorter.sortEntitiesStream(clazz, this.staticSort.get(), entityStream); + } + + final Optional result = entityStream.findFirst(); + if(LOG.isDebugEnabled()) + { + LOG.debug( + "Query for class {} found an entity: {}", + clazz.getSimpleName(), + result.isPresent() + ); + } + return result; + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/SingleQueryExecutor.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/SingleQueryExecutor.java new file mode 100644 index 00000000..620cfd9f --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/SingleQueryExecutor.java @@ -0,0 +1,56 @@ +/* + * Copyright © 2023 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.repository.query.executors; + +import java.util.Collection; +import java.util.Optional; + +import org.springframework.data.domain.Sort; + +import jakarta.annotation.Nullable; +import software.xdev.spring.data.eclipse.store.repository.query.criteria.Criteria; +import software.xdev.spring.data.eclipse.store.repository.support.copier.working.WorkingCopier; + + +/** + * Queries entities and returns the found entity. + * + * @param Entity-Type to query + */ +public class SingleQueryExecutor implements QueryExecutor +{ + private final SingleOptionalQueryExecutor optionalQueryExecutor; + + public SingleQueryExecutor(final WorkingCopier copier, final Criteria criteria, final Sort sort) + { + this.optionalQueryExecutor = new SingleOptionalQueryExecutor<>(copier, criteria, sort); + } + + /** + * {@inheritDoc} + * + * @return found object. If no object with criteria is found, {@code null} is returned. + */ + @Override + public T execute( + @Nullable final Class clazz, + @Nullable final Collection entities, + @Nullable final Object[] values) + { + final Optional optionalResult = this.optionalQueryExecutor.execute(clazz, entities, values); + return optionalResult.orElse(null); + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/EclipseStoreQueryLookupStrategy.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/EclipseStoreQueryLookupStrategy.java new file mode 100644 index 00000000..3f0bf32b --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/EclipseStoreQueryLookupStrategy.java @@ -0,0 +1,113 @@ +/* + * Copyright © 2023 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.repository.support; + +import java.lang.reflect.Method; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.data.projection.ProjectionFactory; +import org.springframework.data.repository.core.NamedQueries; +import org.springframework.data.repository.core.RepositoryMetadata; +import org.springframework.data.repository.query.QueryLookupStrategy; +import org.springframework.data.repository.query.QueryMethod; +import org.springframework.data.repository.query.RepositoryQuery; + +import jakarta.annotation.Nonnull; +import software.xdev.spring.data.eclipse.store.repository.EclipseStoreStorage; +import software.xdev.spring.data.eclipse.store.repository.Query; +import software.xdev.spring.data.eclipse.store.repository.query.FindAllEclipseStoreQueryProvider; +import software.xdev.spring.data.eclipse.store.repository.query.StringBasedEclipseStoreQueryProvider; +import software.xdev.spring.data.eclipse.store.repository.support.copier.working.WorkingCopierCreator; + + +public class EclipseStoreQueryLookupStrategy implements QueryLookupStrategy +{ + private static final Logger LOG = LoggerFactory.getLogger(EclipseStoreQueryLookupStrategy.class); + private final EclipseStoreStorage storage; + private final WorkingCopierCreator workingCopierCreator; + + public EclipseStoreQueryLookupStrategy( + final EclipseStoreStorage storage, + final WorkingCopierCreator workingCopierCreator) + { + this.storage = storage; + this.workingCopierCreator = workingCopierCreator; + } + + @Override + @Nonnull + public RepositoryQuery resolveQuery( + @Nonnull final Method method, + @Nonnull final RepositoryMetadata metadata, + @Nonnull final ProjectionFactory factory, + @Nonnull final NamedQueries namedQueries) + { + final QueryMethod queryMethod = new QueryMethod(method, metadata, factory); + + if(method.getAnnotation(Query.class) != null) + { + LOG.warn( + "Annotation @Query is used in Repository {}. This is useless for now and should be deleted.", + metadata.getRepositoryInterface().getSimpleName()); + if(method.getName().equalsIgnoreCase("findall")) + { + // Special case for Queries that have findAll and are annotated with Query + return this.createFindAllEclipseStoreQueryProvider( + metadata.getDomainType(), + queryMethod, + method + ); + } + } + + return this.createStringBasedEclipseStoreQueryProvider( + metadata.getDomainType(), + queryMethod, + method + ); + } + + private RepositoryQuery createFindAllEclipseStoreQueryProvider( + final Class domainType, + final QueryMethod queryMethod, + final Method method + ) + { + return new FindAllEclipseStoreQueryProvider<>( + queryMethod, + method, + domainType, + this.storage, + this.workingCopierCreator.createWorkingCopier(domainType, this.storage) + ); + } + + private RepositoryQuery createStringBasedEclipseStoreQueryProvider( + final Class domainType, + final QueryMethod queryMethod, + final Method method + ) + { + return new StringBasedEclipseStoreQueryProvider<>( + queryMethod, + method, + domainType, + this.storage, + this.workingCopierCreator.createWorkingCopier(domainType, this.storage) + ); + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/EclipseStoreRepositoryFactory.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/EclipseStoreRepositoryFactory.java new file mode 100644 index 00000000..667d2920 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/EclipseStoreRepositoryFactory.java @@ -0,0 +1,109 @@ +/* + * Copyright © 2023 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.repository.support; + +import java.util.Optional; + +import org.springframework.data.mapping.model.BasicPersistentEntity; +import org.springframework.data.repository.core.EntityInformation; +import org.springframework.data.repository.core.RepositoryInformation; +import org.springframework.data.repository.core.RepositoryMetadata; +import org.springframework.data.repository.core.support.PersistentEntityInformation; +import org.springframework.data.repository.core.support.RepositoryComposition; +import org.springframework.data.repository.core.support.RepositoryFactorySupport; +import org.springframework.data.repository.query.QueryLookupStrategy; +import org.springframework.data.repository.query.QueryMethodEvaluationContextProvider; +import org.springframework.data.util.TypeInformation; +import org.springframework.lang.Nullable; + +import jakarta.annotation.Nonnull; +import software.xdev.spring.data.eclipse.store.repository.EclipseStoreStorage; +import software.xdev.spring.data.eclipse.store.repository.support.copier.working.RecursiveWorkingCopier; +import software.xdev.spring.data.eclipse.store.repository.support.copier.working.WorkingCopier; + + +/** + * Creates the correct repository instance for repository-interfaces. + */ +public class EclipseStoreRepositoryFactory extends RepositoryFactorySupport +{ + private final EclipseStoreStorage storage; + + public EclipseStoreRepositoryFactory(final EclipseStoreStorage storage) + { + this.storage = storage; + } + + @Override + @Nonnull + public EntityInformation getEntityInformation(@Nonnull final Class domainClass) + { + return new PersistentEntityInformation<>(new BasicPersistentEntity<>(TypeInformation.of(domainClass))); + } + + @Override + @Nonnull + protected Optional getQueryLookupStrategy( + @Nullable final QueryLookupStrategy.Key key, + @Nonnull final QueryMethodEvaluationContextProvider evaluationContextProvider) + { + return Optional.of(new EclipseStoreQueryLookupStrategy(this.storage, this::createWorkingCopier)); + } + + @Override + @Nonnull + protected Object getTargetRepository(@Nonnull final RepositoryInformation metadata) + { + return this.getTargetRepositoryViaReflection( + metadata, + this.storage, + this.createWorkingCopier(metadata.getDomainType(), this.storage), + metadata.getDomainType() + ); + } + + private WorkingCopier createWorkingCopier( + final Class domainType, + final EclipseStoreStorage storage) + { + return new RecursiveWorkingCopier<>(domainType, storage.getRegistry(), storage, storage); + } + + @Override + @Nonnull + protected Class getRepositoryBaseClass(@Nonnull final RepositoryMetadata metadata) + { + return SimpleEclipseStoreRepository.class; + } + + @Override + @Nonnull + protected RepositoryInformation getRepositoryInformation( + @Nonnull final RepositoryMetadata metadata, + @Nonnull final RepositoryComposition.RepositoryFragments fragments) + { + return super.getRepositoryInformation(metadata, fragments); + } + + @Override + @Nonnull + public T getRepository( + @Nonnull final Class repositoryInterface, + @Nonnull final RepositoryComposition.RepositoryFragments fragments) + { + return super.getRepository(repositoryInterface, fragments); + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/EclipseStoreRepositoryFactoryBean.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/EclipseStoreRepositoryFactoryBean.java new file mode 100644 index 00000000..49382878 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/EclipseStoreRepositoryFactoryBean.java @@ -0,0 +1,53 @@ +/* + * Copyright © 2023 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.repository.support; + +import java.io.Serializable; + +import org.springframework.context.annotation.ComponentScan; +import org.springframework.data.repository.Repository; +import org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport; +import org.springframework.data.repository.core.support.RepositoryFactorySupport; + +import jakarta.annotation.Nonnull; +import jakarta.inject.Inject; +import software.xdev.spring.data.eclipse.store.repository.EclipseStoreStorage; + + +@ComponentScan({ + "software.xdev.spring.data.eclipse.store.repository", + "org.eclipse.store.integrations.spring.boot.types"}) +public class EclipseStoreRepositoryFactoryBean, S, ID extends Serializable> + extends RepositoryFactoryBeanSupport +{ + private final EclipseStoreStorage storage; + + @Inject + public EclipseStoreRepositoryFactoryBean( + final Class repositoryInterface, + final EclipseStoreStorage storage) + { + super(repositoryInterface); + this.storage = storage; + } + + @Override + @Nonnull + protected RepositoryFactorySupport createRepositoryFactory() + { + return new EclipseStoreRepositoryFactory(this.storage); + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/IdFieldFinder.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/IdFieldFinder.java new file mode 100644 index 00000000..19fd7bbf --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/IdFieldFinder.java @@ -0,0 +1,53 @@ +/* + * Copyright © 2023 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.repository.support; + +import java.lang.reflect.Field; +import java.util.Collection; +import java.util.Optional; + +import software.xdev.spring.data.eclipse.store.repository.access.AccessHelper; + + +public class IdFieldFinder +{ + private IdFieldFinder() + { + // Only static methods available + } + + /** + * Finds any field in a class with an ID-Annotation ({@link jakarta.persistence.Id} or + * {@link org.springframework.data.annotation.Id}). Finds this field recursively in the Hierarchy-tree. + * + * @return field with ID-Annotation. Is {@link Optional#empty()} if no field was found. + */ + public static Optional findIdField(final Class domainClass) + { + final Collection classFields = AccessHelper.getInheritedPrivateFieldsByName(domainClass).values(); + for(final Field currentField : classFields) + { + if( + currentField.getAnnotationsByType(jakarta.persistence.Id.class).length > 0 + || currentField.getAnnotationsByType(org.springframework.data.annotation.Id.class).length > 0 + ) + { + return Optional.of(currentField); + } + } + return Optional.empty(); + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/SimpleEclipseStoreRepository.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/SimpleEclipseStoreRepository.java new file mode 100644 index 00000000..77bc215f --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/SimpleEclipseStoreRepository.java @@ -0,0 +1,279 @@ +/* + * Copyright © 2023 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.repository.support; + +import java.lang.reflect.Field; +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 org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.domain.Sort; + +import jakarta.annotation.Nonnull; +import software.xdev.spring.data.eclipse.store.exceptions.FieldAccessReflectionException; +import software.xdev.spring.data.eclipse.store.exceptions.NoIdFieldFoundException; +import software.xdev.spring.data.eclipse.store.repository.EclipseStoreRepository; +import software.xdev.spring.data.eclipse.store.repository.EclipseStoreStorage; +import software.xdev.spring.data.eclipse.store.repository.access.modifier.FieldAccessModifier; +import software.xdev.spring.data.eclipse.store.repository.query.criteria.Criteria; +import software.xdev.spring.data.eclipse.store.repository.query.executors.ListQueryExecutor; +import software.xdev.spring.data.eclipse.store.repository.query.executors.PageableQueryExecutor; +import software.xdev.spring.data.eclipse.store.repository.support.copier.working.WorkingCopier; +import software.xdev.spring.data.eclipse.store.repository.support.copier.working.WorkingCopierResult; + + +public class SimpleEclipseStoreRepository implements EclipseStoreRepository +{ + private static final Logger LOG = LoggerFactory.getLogger(SimpleEclipseStoreRepository.class); + private final EclipseStoreStorage storage; + private final Class domainClass; + private final WorkingCopier copier; + private Field idField; + + public SimpleEclipseStoreRepository( + final EclipseStoreStorage storage, + final WorkingCopier copier, + final Class domainClass) + { + this.storage = storage; + this.domainClass = domainClass; + this.storage.registerEntity(domainClass); + this.copier = copier; + } + + public Field getIdField() + { + if(this.idField == null) + { + final Optional foundIdField = IdFieldFinder.findIdField(this.domainClass); + if(foundIdField.isEmpty()) + { + throw new NoIdFieldFoundException(String.format( + "Could not find id field in class %s", + this.domainClass.getSimpleName())); + } + this.idField = foundIdField.get(); + } + return this.idField; + } + + @SuppressWarnings("unchecked") + public synchronized List saveBulk(final Collection entities) + { + if(LOG.isDebugEnabled()) + { + LOG.debug("Saving {} entities...", entities.size()); + } + final List> results = + this.checkEntityForNull(entities) + .stream() + .map(this.copier::mergeBack) + .toList(); + final Set nonEntitiesToStore = + results + .stream() + .map(WorkingCopierResult::nonEntitiesToStore) + .flatMap(Collection::stream) + .collect(Collectors.toUnmodifiableSet()); + final List entitiesToStore = + results + .stream() + .map(WorkingCopierResult::originalEntities) + .flatMap(Collection::stream) + .toList(); + if(LOG.isDebugEnabled()) + { + LOG.debug("Collected {} non-entities to store.", nonEntitiesToStore.size()); + } + this.storage.store(nonEntitiesToStore, this.domainClass, entitiesToStore); + return (List)entitiesToStore; + } + + @Override + @Nonnull + public synchronized S save(@Nonnull final S entity) + { + return this.saveBulk(List.of(this.checkEntityForNull(entity))).get(0); + } + + private S checkEntityForNull(final S entity) + { + if(entity == null) + { + throw new IllegalArgumentException("Entity must not be null"); + } + return entity; + } + + @Override + @Nonnull + public List saveAll(@Nonnull final Iterable entities) + { + final List list = new ArrayList<>(); + this.checkEntityForNull(entities).forEach(list::add); + return this.saveBulk(list); + } + + @Override + @Nonnull + public Optional findById(@Nonnull final ID id) + { + for(final T entity : this.storage.getEntityList(this.domainClass)) + { + try(final FieldAccessModifier fam = FieldAccessModifier.makeFieldReadable(this.getIdField(), entity)) + { + if(id.equals(fam.getValueOfField(entity))) + { + return Optional.of(this.copier.copy(entity)); + } + } + catch(final Exception e) + { + throw new FieldAccessReflectionException(String.format( + FieldAccessReflectionException.COULD_NOT_READ_FIELD, + this.getIdField().getName()), e); + } + } + return Optional.empty(); + } + + @Override + public boolean existsById(@Nonnull final ID id) + { + for(final T entity : this.storage.getEntityList(this.domainClass)) + { + try(final FieldAccessModifier fam = FieldAccessModifier.makeFieldReadable(this.getIdField(), entity)) + { + if(id.equals(fam.getValueOfField(entity))) + { + return true; + } + } + catch(final Exception e) + { + throw new FieldAccessReflectionException(String.format( + FieldAccessReflectionException.COULD_NOT_READ_FIELD, + this.getIdField().getName()), e); + } + } + return false; + } + + @Override + @Nonnull + public List findAll() + { + return this.copier.copy(this.storage.getEntityList(this.domainClass)).stream().toList(); + } + + @Override + @Nonnull + public List findAllById(@Nonnull final Iterable ids) + { + final List foundEntities = new ArrayList<>(); + for(final T entity : this.storage.getEntityList(this.domainClass)) + { + try(final FieldAccessModifier fam = FieldAccessModifier.makeFieldReadable(this.getIdField(), entity)) + { + for(final ID id : ids) + { + if(id.equals(fam.getValueOfField(entity))) + { + foundEntities.add(this.copier.copy(entity)); + } + } + } + catch(final Exception e) + { + throw new FieldAccessReflectionException(String.format( + FieldAccessReflectionException.COULD_NOT_READ_FIELD, + this.getIdField().getName()), e); + } + } + return foundEntities; + } + + @Override + public long count() + { + return this.storage.getEntityList(this.domainClass).size(); + } + + @Override + public void deleteById(@Nonnull final ID id) + { + final Optional byId = this.findById(id); + byId.ifPresent(this::delete); + } + + @Override + public void delete(@Nonnull final T entity) + { + this.storage.delete(this.domainClass, this.copier.getOriginal(entity)); + this.copier.deregister(entity); + } + + @Override + public void deleteAllById(final Iterable ids) + { + for(final ID id : ids) + { + this.deleteById(id); + } + } + + @Override + public void deleteAll(final Iterable entities) + { + for(final T entity : entities) + { + this.delete(entity); + } + } + + @Override + public void deleteAll() + { + this.storage.deleteAll(this.domainClass); + } + + @Override + @Nonnull + public List findAll(@Nonnull final Sort sort) + { + final ListQueryExecutor query = new ListQueryExecutor<>(this.copier, Criteria.createNoCriteria()); + return query.execute(this.domainClass, this.storage.getEntityList(this.domainClass), new Object[]{sort}); + } + + @Override + @Nonnull + public Page findAll(@Nonnull final Pageable pageable) + { + final PageableQueryExecutor pageableQuery = + new PageableQueryExecutor<>(this.copier, Criteria.createNoCriteria(), null); + return pageableQuery.execute( + this.domainClass, + this.storage.getEntityList(this.domainClass), + new Object[]{pageable}); + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/DataTypeUtil.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/DataTypeUtil.java new file mode 100644 index 00000000..bfa12f68 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/DataTypeUtil.java @@ -0,0 +1,70 @@ +/* + * Copyright © 2023 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.repository.support.copier; + +import java.util.HashSet; +import java.util.Objects; + +import jakarta.annotation.Nonnull; + +public class DataTypeUtil +{ + private static final HashSet> WRAPPER_TYPES; + + static + { + WRAPPER_TYPES = new HashSet<>(10); + WRAPPER_TYPES.add(Integer.class); + WRAPPER_TYPES.add(Byte.class); + WRAPPER_TYPES.add(Character.class); + WRAPPER_TYPES.add(Boolean.class); + WRAPPER_TYPES.add(Double.class); + WRAPPER_TYPES.add(Float.class); + WRAPPER_TYPES.add(Long.class); + WRAPPER_TYPES.add(Short.class); + WRAPPER_TYPES.add(Void.class); + WRAPPER_TYPES.add(String.class); + } + + private DataTypeUtil() + { + // Only static methods available + } + + public static boolean isObjectArray(final Object obj) + { + return obj instanceof Object[]; + } + + public static boolean isPrimitiveArray(final Object obj) + { + return obj instanceof boolean[] || + obj instanceof byte[] || obj instanceof short[] || + obj instanceof char[] || obj instanceof int[] || + obj instanceof long[] || obj instanceof float[] || + obj instanceof double[]; + } + + public static boolean isPrimitiveType(@Nonnull final Class source) + { + Objects.requireNonNull(source); + if(WRAPPER_TYPES.contains(source)) + { + return true; + } + return source.isPrimitive(); + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/IdSetter.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/IdSetter.java new file mode 100644 index 00000000..89df9ff0 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/IdSetter.java @@ -0,0 +1,66 @@ +/* + * Copyright © 2023 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.repository.support.copier.id; + +import java.lang.reflect.Field; +import java.util.Objects; +import java.util.Optional; +import java.util.function.Consumer; +import java.util.function.Supplier; + +import jakarta.persistence.GeneratedValue; +import software.xdev.spring.data.eclipse.store.repository.support.IdFieldFinder; +import software.xdev.spring.data.eclipse.store.repository.support.copier.id.strategy.IdFinder; + + +/** + * A IdSetter must be unique in one storage for one entity-class. It creates Ids and therefore must know all + * existing entities of one class. + * + * @param + */ +public interface IdSetter +{ + static IdSetter createIdSetter( + final Class classWithId, + final Consumer lastIdPersister, + final Supplier lastIdGetter) + { + Objects.requireNonNull(classWithId); + Objects.requireNonNull(lastIdPersister); + Objects.requireNonNull(lastIdGetter); + final Optional idField = IdFieldFinder.findIdField(classWithId); + if(idField.isEmpty()) + { + return new NotSettingIdSetter<>(); + } + final GeneratedValue generatedValueAnnotation = idField.get().getAnnotation(GeneratedValue.class); + if(generatedValueAnnotation == null) + { + return new NotSettingIdSetter<>(); + } + return new SimpleIdSetter<>( + idField.get(), + IdFinder.createIdFinder(idField.get(), generatedValueAnnotation, lastIdGetter), + lastIdPersister); + } + + /** + * This method makes sure, that an id is set for the given object. If it is already set (not null), then nothing is + * done. If it is not set, a new one will be generated and set. + */ + void ensureId(T objectToSetIdIn); +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/NotSettingIdSetter.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/NotSettingIdSetter.java new file mode 100644 index 00000000..4177bf27 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/NotSettingIdSetter.java @@ -0,0 +1,25 @@ +/* + * Copyright © 2023 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.repository.support.copier.id; + +public class NotSettingIdSetter implements IdSetter +{ + @Override + public void ensureId(final T objectToSetIdIn) + { + // Don't need to do anything + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/SimpleIdSetter.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/SimpleIdSetter.java new file mode 100644 index 00000000..1d652aa3 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/SimpleIdSetter.java @@ -0,0 +1,60 @@ +/* + * Copyright © 2023 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.repository.support.copier.id; + +import java.lang.reflect.Field; +import java.util.function.Consumer; + +import software.xdev.spring.data.eclipse.store.exceptions.FieldAccessReflectionException; +import software.xdev.spring.data.eclipse.store.repository.access.modifier.FieldAccessModifier; +import software.xdev.spring.data.eclipse.store.repository.access.modifier.FieldAccessModifierToEditable; +import software.xdev.spring.data.eclipse.store.repository.support.copier.id.strategy.IdFinder; + + +public class SimpleIdSetter implements IdSetter +{ + private final IdFinder idFinder; + private final Field idField; + private final Consumer lastIdPersister; + + public SimpleIdSetter(final Field idField, final IdFinder idFinder, final Consumer lastIdPersister) + { + this.idField = idField; + this.idFinder = idFinder; + this.lastIdPersister = lastIdPersister::accept; + } + + @Override + public void ensureId(final T objectToSetIdIn) + { + try(final FieldAccessModifierToEditable fam = FieldAccessModifier.makeFieldEditable( + this.idField, + objectToSetIdIn)) + { + final Object existingId = fam.getValueOfField(objectToSetIdIn); + if(existingId == null) + { + final ID newId = this.idFinder.findId(); + fam.writeValueOfField(objectToSetIdIn, newId); + this.lastIdPersister.accept(newId); + } + } + catch(final Exception e) + { + throw new FieldAccessReflectionException(this.idField, e); + } + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/strategy/IdFinder.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/strategy/IdFinder.java new file mode 100644 index 00000000..b26de773 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/strategy/IdFinder.java @@ -0,0 +1,65 @@ +/* + * Copyright © 2023 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.repository.support.copier.id.strategy; + +import java.lang.reflect.Field; +import java.util.Objects; +import java.util.function.Supplier; + +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import software.xdev.spring.data.eclipse.store.exceptions.IdGeneratorNotSupportedException; +import software.xdev.spring.data.eclipse.store.repository.support.copier.id.strategy.auto.AutoIntegerIdFinder; +import software.xdev.spring.data.eclipse.store.repository.support.copier.id.strategy.auto.AutoLongIdFinder; +import software.xdev.spring.data.eclipse.store.repository.support.copier.id.strategy.auto.AutoStringIdFinder; + + +/** + * A IdFinder must be unique in one storage for one entity-class. It creates Ids and therefore must know all + * existing entities of one class. + */ +public interface IdFinder +{ + @SuppressWarnings({"java:S1452", "TypeParameterExplicitlyExtendsObject"}) + static IdFinder createIdFinder( + final Field idField, + final GeneratedValue generatedValueAnnotation, + final Supplier lastIdGetter) + { + Objects.requireNonNull(lastIdGetter); + if(generatedValueAnnotation.strategy() == GenerationType.AUTO) + { + if(Integer.class.isAssignableFrom(idField.getType()) || int.class.isAssignableFrom(idField.getType())) + { + return new AutoIntegerIdFinder(lastIdGetter); + } + else if(idField.getType().equals(String.class)) + { + return new AutoStringIdFinder(lastIdGetter); + } + else if(Long.class.isAssignableFrom(idField.getType()) || long.class.isAssignableFrom(idField.getType())) + { + return new AutoLongIdFinder(lastIdGetter); + } + } + throw new IdGeneratorNotSupportedException(String.format( + "Id generator with strategy %s for type %s is not supported.", + generatedValueAnnotation.strategy(), + idField.getType().getSimpleName())); + } + + ID findId(); +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/strategy/auto/AbstractAutoIdFinder.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/strategy/auto/AbstractAutoIdFinder.java new file mode 100644 index 00000000..ac603696 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/strategy/auto/AbstractAutoIdFinder.java @@ -0,0 +1,53 @@ +/* + * Copyright © 2023 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.repository.support.copier.id.strategy.auto; + +import java.util.Objects; +import java.util.function.Supplier; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import software.xdev.spring.data.eclipse.store.repository.support.copier.id.strategy.IdFinder; + + +public abstract class AbstractAutoIdFinder implements IdFinder +{ + private static final Logger LOG = LoggerFactory.getLogger(AbstractAutoIdFinder.class); + final Supplier lastIdGetter; + + protected AbstractAutoIdFinder(final Supplier lastIdGetter) + { + this.lastIdGetter = Objects.requireNonNull(lastIdGetter); + if(LOG.isDebugEnabled()) + { + LOG.debug("New AutoIdFinder created. Starting ID: {}", this.lastIdGetter.get()); + } + } + + @Override + public ID findId() + { + final ID nextId = this.getNext(this.lastIdGetter.get()); + if(LOG.isDebugEnabled()) + { + LOG.debug("New Id created: {}", nextId); + } + return nextId; + } + + protected abstract ID getNext(ID oldId); +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/strategy/auto/AutoIntegerIdFinder.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/strategy/auto/AutoIntegerIdFinder.java new file mode 100644 index 00000000..39602d50 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/strategy/auto/AutoIntegerIdFinder.java @@ -0,0 +1,37 @@ +/* + * Copyright © 2023 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.repository.support.copier.id.strategy.auto; + +import java.util.function.Supplier; + + +public class AutoIntegerIdFinder extends AbstractAutoIdFinder +{ + public AutoIntegerIdFinder(final Supplier idGetter) + { + super(() -> (Integer)idGetter.get()); + } + + @Override + protected Integer getNext(final Integer oldId) + { + if(oldId == null || oldId == Integer.MAX_VALUE) + { + return 0; + } + return oldId + 1; + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/strategy/auto/AutoLongIdFinder.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/strategy/auto/AutoLongIdFinder.java new file mode 100644 index 00000000..db1e5ea9 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/strategy/auto/AutoLongIdFinder.java @@ -0,0 +1,48 @@ +/* + * Copyright © 2023 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.repository.support.copier.id.strategy.auto; + +import java.util.function.Supplier; + + +public class AutoLongIdFinder extends AbstractAutoIdFinder +{ + public AutoLongIdFinder(final Supplier lastIdGetter) + { + super(() -> (Long)lastIdGetter.get()); + } + + @Override + protected Long getNext(final Long oldId) + { + if(oldId == null) + { + return 0L; + } + try + { + if(oldId == Long.MAX_VALUE) + { + return 0L; + } + return oldId + 1L; + } + catch(final NumberFormatException e) + { + return 0L; + } + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/strategy/auto/AutoStringIdFinder.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/strategy/auto/AutoStringIdFinder.java new file mode 100644 index 00000000..c4e835eb --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/strategy/auto/AutoStringIdFinder.java @@ -0,0 +1,49 @@ +/* + * Copyright © 2023 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.repository.support.copier.id.strategy.auto; + +import java.util.function.Supplier; + + +public class AutoStringIdFinder extends AbstractAutoIdFinder +{ + public AutoStringIdFinder(final Supplier idGetter) + { + super(() -> (String)idGetter.get()); + } + + @Override + protected String getNext(final String oldId) + { + if(oldId == null) + { + return Long.toUnsignedString(0L); + } + try + { + final long newId = Long.parseUnsignedLong(oldId); + if(newId == Long.MAX_VALUE) + { + return Long.toUnsignedString(0L); + } + return Long.toUnsignedString(newId + 1L); + } + catch(final NumberFormatException e) + { + return Long.toUnsignedString(0L); + } + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/object/EclipseSerializerRegisteringCopier.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/object/EclipseSerializerRegisteringCopier.java new file mode 100644 index 00000000..380d6acf --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/object/EclipseSerializerRegisteringCopier.java @@ -0,0 +1,190 @@ +/* + * Copyright © 2023 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.repository.support.copier.object; + +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.serializer.Serializer; +import org.eclipse.serializer.SerializerFoundation; +import org.eclipse.serializer.persistence.binary.jdk17.java.util.BinaryHandlerImmutableCollectionsList12; +import org.eclipse.serializer.persistence.binary.jdk17.java.util.BinaryHandlerImmutableCollectionsSet12; +import org.eclipse.serializer.persistence.binary.types.Binary; +import org.eclipse.serializer.persistence.binary.types.BinaryStorer; +import org.eclipse.serializer.persistence.types.PersistenceLoader; +import org.eclipse.serializer.persistence.types.PersistenceManager; +import org.eclipse.serializer.persistence.types.PersistenceStorer; +import org.eclipse.serializer.reference.Reference; +import org.eclipse.serializer.util.X; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import software.xdev.spring.data.eclipse.store.repository.WorkingCopyRegistry; +import software.xdev.spring.data.eclipse.store.repository.support.copier.DataTypeUtil; + + +/** + * This class utilizes EclipseStore-Serialization and copies objects by serializing and deserializing objects in + * memory. + */ +public class EclipseSerializerRegisteringCopier implements RegisteringObjectCopier +{ + private static final Logger LOG = LoggerFactory.getLogger(EclipseSerializerRegisteringCopier.class); + private final SerializerFoundation foundation; + private PersistenceManager persistenceManager; + + private final WorkingCopyRegistry registry; + + public EclipseSerializerRegisteringCopier(final WorkingCopyRegistry registry) + { + final SerializerFoundation newFoundation = SerializerFoundation.New(); + newFoundation.registerCustomTypeHandler(BinaryHandlerImmutableCollectionsSet12.New()); + newFoundation.registerCustomTypeHandler(BinaryHandlerImmutableCollectionsList12.New()); + this.foundation = newFoundation; + this.registry = registry; + } + + @Override + public synchronized T copy(final T source) + { + return this.copy(source, false); + } + + @Override + public synchronized void close() + { + if(this.persistenceManager != null) + { + this.persistenceManager.objectRegistry().clearAll(); + this.persistenceManager.close(); + this.persistenceManager = null; + } + } + + private void lazyInit() + { + if(this.persistenceManager == null) + { + final Reference buffer = X.Reference(null); + final Serializer.Source source = () -> X.Constant(buffer.get()); + final Serializer.Target target = buffer::set; + this.persistenceManager = + (((SerializerFoundation)this.foundation.setPersistenceSource(source)) + .setPersistenceTarget(target)) + // Make every type persistable. + // This is quite dangerous! + // But if this is not set we get problems f.e. with HashMap$Node + .setTypeEvaluatorPersistable(a -> true) + .createPersistenceManager(); + } + else + { + this.persistenceManager.objectRegistry().truncateAll(); + } + } + + /** + * Here lies a lot of knowledge about EclipseStore internals. + *

+ * Edit with caution! + *

+ *

+ * A storer is created. Then a loader. By then calling {@link PersistenceStorer#store(Object)} the source-object is + * serialized in memory. Then the created objects are put in a Map which holds the EclipseStore-ObjectId and all + * the + * serialized objects. By calling {@link PersistenceLoader#get()} the serilized objects are deserialized. Then we + * iterate over the deserlized objects and pair them with the corresponding source-objects through the + * EclipseStore-ObjectId. + *

+ */ + @SuppressWarnings("unchecked") + @Override + public synchronized T copy(final T source, final boolean invertRegistering) + { + this.lazyInit(); + final BinaryStorer.Default storer = (BinaryStorer.Default)this.persistenceManager.createStorer(); + // Loader erstellen + final PersistenceLoader loader = this.persistenceManager.createLoader(); + + storer.store(source); + + final Map originalObjects = new HashMap<>(); + + storer.iterateMergeableEntries(originalObjects::put); + + storer.commit(); + + final T returnValue = (T)loader.get(); + + final Summarizer summarizer = new Summarizer(); + + loader.iterateEntries( + (id, copiedObject) -> + { + summarizer.incrementCopiedObjectsCount(); + if(DataTypeUtil.isPrimitiveType(copiedObject.getClass())) + { + return; + } + final Object originalObject = originalObjects.get(id); + if(originalObject != null) + { + summarizer.incrementRegisteredObjectsCountt(); + if(invertRegistering) + { + this.registry.invertRegister(copiedObject, originalObject); + } + else + { + this.registry.register(copiedObject, originalObject); + } + } + } + ); + + if(LOG.isTraceEnabled()) + { + LOG.trace( + "Copied {} and registered {} objects.", + summarizer.copiedObjectsCount, + summarizer.registeredObjectsCount); + } + + return returnValue; + } + + private static class Summarizer + { + private long copiedObjectsCount; + private long registeredObjectsCount; + + public Summarizer() + { + this.copiedObjectsCount = 0; + this.registeredObjectsCount = 0; + } + + public void incrementCopiedObjectsCount() + { + this.copiedObjectsCount += 1; + } + + public void incrementRegisteredObjectsCountt() + { + this.registeredObjectsCount += 1; + } + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/object/RegisteringObjectCopier.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/object/RegisteringObjectCopier.java new file mode 100644 index 00000000..4e659c08 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/object/RegisteringObjectCopier.java @@ -0,0 +1,24 @@ +/* + * Copyright © 2023 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.repository.support.copier.object; + +import org.eclipse.serializer.ObjectCopier; + + +public interface RegisteringObjectCopier extends ObjectCopier +{ + T copy(T t, boolean invertRegistering); +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/ChangedObjectCollector.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/ChangedObjectCollector.java new file mode 100644 index 00000000..d1cd9f5b --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/ChangedObjectCollector.java @@ -0,0 +1,22 @@ +/* + * Copyright © 2023 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.repository.support.copier.working; + +@FunctionalInterface +public interface ChangedObjectCollector +{ + void collectChangedObject(Object changedObject); +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/HashSetChangedObjectCollector.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/HashSetChangedObjectCollector.java new file mode 100644 index 00000000..dc9fad70 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/HashSetChangedObjectCollector.java @@ -0,0 +1,65 @@ +/* + * Copyright © 2023 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.repository.support.copier.working; + +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +import org.eclipse.serializer.persistence.types.Unpersistable; + +import software.xdev.spring.data.eclipse.store.repository.PersistableChecker; + + +public class HashSetChangedObjectCollector implements ChangedObjectCollector, Unpersistable +{ + private final List nonEntityObjects = new ArrayList<>(); + private final List entityObjects = new ArrayList<>(); + private final Class entityClass; + private final PersistableChecker persistableChecker; + + public HashSetChangedObjectCollector(final Class entityClass, final PersistableChecker persistableChecker) + { + this.entityClass = entityClass; + this.persistableChecker = persistableChecker; + } + + @SuppressWarnings("unchecked") + @Override + public void collectChangedObject(final Object changedObject) + { + if(!this.persistableChecker.isPersistable(changedObject.getClass())) + { + return; + } + if(this.entityClass.isInstance(changedObject)) + { + this.entityObjects.add((T)changedObject); + } + else + { + this.nonEntityObjects.add(changedObject); + } + } + + public WorkingCopierResult toResult() + { + return new WorkingCopierResult<>( + this.entityObjects.stream().collect(Collectors.toUnmodifiableSet()), + this.nonEntityObjects.stream().collect(Collectors.toUnmodifiableSet()) + ); + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/HashSetMergedTargetsCollector.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/HashSetMergedTargetsCollector.java new file mode 100644 index 00000000..4e1c7cbc --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/HashSetMergedTargetsCollector.java @@ -0,0 +1,38 @@ +/* + * Copyright © 2023 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.repository.support.copier.working; + +import java.util.HashSet; + +import org.eclipse.serializer.persistence.types.Unpersistable; + + +public class HashSetMergedTargetsCollector implements MergedTargetsCollector, Unpersistable +{ + private final HashSet mergedTargets = new HashSet<>(); + + @Override + public void collectMergedTarget(final Object mergedTarget) + { + this.mergedTargets.add(mergedTarget); + } + + @Override + public boolean isAlreadyMerged(final Object possiblyMergedTarget) + { + return this.mergedTargets.contains(possiblyMergedTarget); + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/MergedTargetsCollector.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/MergedTargetsCollector.java new file mode 100644 index 00000000..86112646 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/MergedTargetsCollector.java @@ -0,0 +1,23 @@ +/* + * Copyright © 2023 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.repository.support.copier.working; + +public interface MergedTargetsCollector +{ + void collectMergedTarget(Object mergedTarget); + + boolean isAlreadyMerged(Object possiblyMergedTarget); +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/RecursiveWorkingCopier.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/RecursiveWorkingCopier.java new file mode 100644 index 00000000..1c0d7cc4 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/RecursiveWorkingCopier.java @@ -0,0 +1,279 @@ +/* + * Copyright © 2023 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.repository.support.copier.working; + +import java.lang.reflect.Array; +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; +import java.util.Collection; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import software.xdev.spring.data.eclipse.store.exceptions.MergeFailedException; +import software.xdev.spring.data.eclipse.store.repository.IdSetterProvider; +import software.xdev.spring.data.eclipse.store.repository.PersistableChecker; +import software.xdev.spring.data.eclipse.store.repository.WorkingCopyRegistry; +import software.xdev.spring.data.eclipse.store.repository.access.AccessHelper; +import software.xdev.spring.data.eclipse.store.repository.access.modifier.FieldAccessModifier; +import software.xdev.spring.data.eclipse.store.repository.access.modifier.FieldAccessModifierToEditable; +import software.xdev.spring.data.eclipse.store.repository.support.copier.DataTypeUtil; +import software.xdev.spring.data.eclipse.store.repository.support.copier.object.EclipseSerializerRegisteringCopier; +import software.xdev.spring.data.eclipse.store.repository.support.copier.object.RegisteringObjectCopier; + + +/** + * Creates copies and puts them back. Recognizes already persisted Objects and checks them for changes as well. + * + * @param + */ +public class RecursiveWorkingCopier implements WorkingCopier +{ + private static final Logger LOG = LoggerFactory.getLogger(RecursiveWorkingCopier.class); + private final RegisteringObjectCopier objectCopier; + private final WorkingCopyRegistry registry; + private final IdSetterProvider idSetterProvider; + private final Class domainClass; + private final PersistableChecker persistableChecker; + + public RecursiveWorkingCopier( + final Class domainClass, + final WorkingCopyRegistry registry, + final IdSetterProvider idSetterProvider, + final PersistableChecker persistableChecker) + { + this.domainClass = domainClass; + this.registry = registry; + this.objectCopier = new EclipseSerializerRegisteringCopier(registry); + this.idSetterProvider = idSetterProvider; + this.persistableChecker = persistableChecker; + } + + @Override + public T copy(final T objectToCopy) + { + final T createdCopy = this.genericCopy(objectToCopy, false); + if(LOG.isTraceEnabled()) + { + LOG.trace("Copied object of class {}", objectToCopy.getClass().getSimpleName()); + } + return createdCopy; + } + + @Override + public > L copy(final L objectCollectionToCopy) + { + final L createdCopy = this.genericCopy(objectCollectionToCopy, false); + if(LOG.isTraceEnabled()) + { + LOG.trace("Copied collection with class {}", objectCollectionToCopy.getClass().getSimpleName()); + } + return createdCopy; + } + + private E genericCopy(final E objectToCopy, final boolean invertRegistry) + { + if(this.registry.getOriginalObjectFromWorkingCopy(objectToCopy) != null) + { + // Object is already a working copy. + // Copy isn't created again to stop recursive stack overflow. + return objectToCopy; + } + return this.onlyCreateCopy(objectToCopy, invertRegistry); + } + + @Override + public WorkingCopierResult mergeBack(final T workingCopy) + { + final HashSetChangedObjectCollector changedObjectCollector = + new HashSetChangedObjectCollector<>(this.domainClass, this.persistableChecker); + this.getOrCreateObjectForDatastore( + workingCopy, + true, + new HashSetMergedTargetsCollector(), + changedObjectCollector); + if(LOG.isTraceEnabled()) + { + LOG.trace("Merging back the working copy object of class {}", workingCopy.getClass().getSimpleName()); + } + return changedObjectCollector.toResult(); + } + + @SuppressWarnings("unchecked") + public E getOrCreateObjectForDatastore( + final E workingCopy, + final boolean mergeValues, + final MergedTargetsCollector alreadyMergedTargets, + final ChangedObjectCollector changedCollector) + { + if(workingCopy == null) + { + return null; + } + this.idSetterProvider.ensureIdSetter((Class)workingCopy.getClass()).ensureId(workingCopy); + final E originalObject = this.registry.getOriginalObjectFromWorkingCopy(workingCopy); + if(originalObject != null) + { + if(mergeValues) + { + this.mergeValues(workingCopy, originalObject, alreadyMergedTargets, changedCollector); + } + changedCollector.collectChangedObject(originalObject); + return originalObject; + } + + // The object to merge back is not a working copy, but a originalObject. + // Therefore, we create a copy to persist this in the storage. + final E objectForDatastore = this.genericCopy(workingCopy, true); + // "Why merging values of an identical object?" you might ask. + // Well, because some sub-objects might already be in the datastore. + this.mergeValues(workingCopy, objectForDatastore, alreadyMergedTargets, changedCollector); + changedCollector.collectChangedObject(objectForDatastore); + return objectForDatastore; + } + + @Override + public T getOriginal(final T workingCopy) + { + return this.registry.getOriginalObjectFromWorkingCopy(workingCopy); + } + + private void mergeValues( + final E sourceObject, + final E targetObject, + final MergedTargetsCollector alreadyMergedTargets, + final ChangedObjectCollector changedCollector) + { + if(sourceObject == targetObject || alreadyMergedTargets.isAlreadyMerged(targetObject) || targetObject == null) + { + // alreadyMergedTargets prevent endless loops + return; + } + alreadyMergedTargets.collectMergedTarget(targetObject); + AccessHelper.getInheritedPrivateFieldsByName(sourceObject.getClass()).values().forEach( + field -> + this.mergeValueOfField(sourceObject, targetObject, field, alreadyMergedTargets, changedCollector) + ); + } + + private void mergeValueOfField( + final E sourceObject, + final E targetObject, + final Field field, + final MergedTargetsCollector alreadyMergedTargets, + final ChangedObjectCollector changedCollector) + { + try + { + final int fieldModifiers = field.getModifiers(); + if(Modifier.isStatic(fieldModifiers)) + { + return; + } + + try(final FieldAccessModifierToEditable fam = FieldAccessModifier.makeFieldEditable( + field, + sourceObject)) + { + final Object valueOfSourceObject = fam.getValueOfField(sourceObject); + final Object valueOfTargetObject = fam.getValueOfField(targetObject); + // If the same, then there is nothing to do + if(valueOfTargetObject != valueOfSourceObject) + { + // Something in the containingObject has changed + changedCollector.collectChangedObject(targetObject); + if(DataTypeUtil.isPrimitiveType(field.getType())) + { + fam.writeValueOfField(targetObject, valueOfSourceObject); + } + else if(DataTypeUtil.isPrimitiveArray(valueOfSourceObject)) + { + // Copy complete Array + fam.writeValueOfField(targetObject, valueOfSourceObject); + } + else if(DataTypeUtil.isObjectArray(valueOfSourceObject)) + { + // Create new Array with original objects with merged data + final Object[] newArray = this.createGenericObjectArray( + valueOfSourceObject.getClass().getComponentType(), + (Object[])valueOfSourceObject, + alreadyMergedTargets, + changedCollector + ); + fam.writeValueOfField(targetObject, newArray); + } + else + { + // "Simple" object + // get original value object + final Object originalValueObjectOfSource = + this.getOrCreateObjectForDatastore( + valueOfSourceObject, + false, + alreadyMergedTargets, + changedCollector); + if(valueOfTargetObject != originalValueObjectOfSource) + { + // If the reference is new, it must be set + fam.writeValueOfField(targetObject, originalValueObjectOfSource); + } + // Merge after setting reference to avoid endless loops + this.mergeValues( + valueOfSourceObject, + originalValueObjectOfSource, + alreadyMergedTargets, + changedCollector); + } + } + } + } + catch(final Exception e) + { + throw new MergeFailedException(sourceObject, targetObject, e); + } + } + + @SuppressWarnings("unchecked") + private E[] createGenericObjectArray( + final Class clazz, + final Object[] valueOfSourceObjectArray, + final MergedTargetsCollector alreadyMergedTargets, + final ChangedObjectCollector changedCollector) + { + // Create new Array with original objects with merged data + final E[] newArray = (E[])Array.newInstance(clazz, valueOfSourceObjectArray.length); + for(int i = 0; i < valueOfSourceObjectArray.length; i++) + { + newArray[i] = this.getOrCreateObjectForDatastore( + (E)valueOfSourceObjectArray[i], + true, + alreadyMergedTargets, + changedCollector); + } + return newArray; + } + + private E onlyCreateCopy(final E objectToCopy, final boolean invertRegistry) + { + return this.objectCopier.copy(objectToCopy, invertRegistry); + } + + @Override + public void deregister(final T workingCopy) + { + this.registry.deregister(workingCopy); + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/WorkingCopier.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/WorkingCopier.java new file mode 100644 index 00000000..c2c60f23 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/WorkingCopier.java @@ -0,0 +1,63 @@ +/* + * Copyright © 2023 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.repository.support.copier.working; + +import java.util.Collection; + + +/** + * Creates, registers and deregisters Instances of working copies. Working copies are object instances that are a copy + * of the objects in the actual datastore. + * + * @param class of the object that will get copied + */ +public interface WorkingCopier +{ + /** + * Creates a new instance of the given object and registers it in the + * {@link software.xdev.spring.data.eclipse.store.repository.WorkingCopyRegistry}. + * + * @return new instance of the object + */ + T copy(T objectToCopy); + + /** + * Creates new instances of each element of the given collection and registers it in the + * {@link software.xdev.spring.data.eclipse.store.repository.WorkingCopyRegistry}. + * + * @return new collection with new instances + */ + > L copy(L objectCollectionToCopy); + + /** + * Merges the values of the given object back into the original object from the date store. + * + * @param workingCopy to merge back into the original object + * @return all the changed objects that must get stored + */ + WorkingCopierResult mergeBack(T workingCopy); + + /** + * @return the original entity that corresponds to the given working copy object. + */ + T getOriginal(T workingCopy); + + /** + * Unregister the working copy object from the + * {@link software.xdev.spring.data.eclipse.store.repository.WorkingCopyRegistry}. + */ + void deregister(T workingCopy); +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/WorkingCopierCreator.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/WorkingCopierCreator.java new file mode 100644 index 00000000..e5415938 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/WorkingCopierCreator.java @@ -0,0 +1,27 @@ +/* + * Copyright © 2023 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.repository.support.copier.working; + +import software.xdev.spring.data.eclipse.store.repository.EclipseStoreStorage; + + +@FunctionalInterface +public interface WorkingCopierCreator +{ + WorkingCopier createWorkingCopier( + final Class domainType, + final EclipseStoreStorage storage); +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/WorkingCopierResult.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/WorkingCopierResult.java new file mode 100644 index 00000000..b780b2da --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/WorkingCopierResult.java @@ -0,0 +1,30 @@ +/* + * Copyright © 2023 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.repository.support.copier.working; + +import java.util.Set; + + +/** + * Holds the result data from the working copier. + * + * @param originalEntities that must get stored + * @param nonEntitiesToStore that must get stored + * @param type of the entity that was merged back + */ +public record WorkingCopierResult(Set originalEntities, Set nonEntitiesToStore) +{ +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/reposyncer/RepositorySynchronizer.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/reposyncer/RepositorySynchronizer.java new file mode 100644 index 00000000..b7b12836 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/reposyncer/RepositorySynchronizer.java @@ -0,0 +1,35 @@ +/* + * Copyright © 2023 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.repository.support.reposyncer; + +import java.util.Collection; + +import software.xdev.spring.data.eclipse.store.core.IdentitySet; + + +/** + * Since EclipseStore is not table-oriented, but the access through the repositories is, we must keep the lists/tables of + * entities in sync with the existing entities in the graph. + *

+ * With every store we must check, if there is a new entity in the graph, that isn't yet in the entity-list. + */ +public interface RepositorySynchronizer +{ + /** + * @return a list of entity-lists that have been changed and now must be stored. + */ + Collection> syncAndReturnChangedObjectLists(Object objectToStore); +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/reposyncer/SimpleRepositorySynchronizer.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/reposyncer/SimpleRepositorySynchronizer.java new file mode 100644 index 00000000..644b4fa8 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/reposyncer/SimpleRepositorySynchronizer.java @@ -0,0 +1,87 @@ +/* + * Copyright © 2023 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.repository.support.reposyncer; + +import java.lang.reflect.Modifier; +import java.util.Collection; +import java.util.HashSet; +import java.util.Map; + +import org.eclipse.serializer.util.traversing.ObjectGraphTraverser; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import software.xdev.spring.data.eclipse.store.core.IdentitySet; +import software.xdev.spring.data.eclipse.store.repository.Root; + + +public class SimpleRepositorySynchronizer implements RepositorySynchronizer +{ + private static final Logger LOG = LoggerFactory.getLogger(SimpleRepositorySynchronizer.class); + private final Map, String> entityWithRepositoryNamesAndClasses; + private final Root root; + private final HashSet> listsToStore; + private final ObjectGraphTraverser buildObjectGraphTraverser; + + public SimpleRepositorySynchronizer( + final Map, String> entityWithRepositoryNamesAndClasses, + final Root root) + { + this.entityWithRepositoryNamesAndClasses = entityWithRepositoryNamesAndClasses; + this.root = root; + this.listsToStore = new HashSet<>(); + + this.buildObjectGraphTraverser = ObjectGraphTraverser.Builder() + .modeFull() + .fieldPredicate(field -> !Modifier.isTransient(field.getModifiers())) + .acceptorLogic( + objectInGraph -> + { + if(objectInGraph == null) + { + return; + } + final Class objectInGraphClass = objectInGraph.getClass(); + final String objectInGraphClassname = + this.entityWithRepositoryNamesAndClasses.get(objectInGraphClass); + if(objectInGraphClassname != null) + { + final IdentitySet entityListForCurrentObject = + this.root.getEntityLists().get(objectInGraphClassname); + if(!entityListForCurrentObject.contains(objectInGraph)) + { + entityListForCurrentObject.add(objectInGraph); + this.listsToStore.add(entityListForCurrentObject); + } + } + } + ).buildObjectGraphTraverser(); + } + + @Override + public Collection> syncAndReturnChangedObjectLists(final Object objectToStore) + { + this.listsToStore.clear(); + this.buildObjectGraphTraverser.traverse(objectToStore); + if(LOG.isTraceEnabled()) + { + LOG.trace("Amount of changed entities: {}", this.listsToStore.size()); + } + final HashSet> setOfChangedObjects = new HashSet<>(this.listsToStore); + this.listsToStore.clear(); + return setOfChangedObjects; + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/util/GenericObjectComparer.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/util/GenericObjectComparer.java new file mode 100644 index 00000000..89d624ae --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/util/GenericObjectComparer.java @@ -0,0 +1,98 @@ +/* + * Copyright © 2023 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.util; + +import software.xdev.spring.data.eclipse.store.exceptions.NotComparableException; + + +public class GenericObjectComparer +{ + private GenericObjectComparer() + { + // Only static methods + } + + public static int compare(final E o1, final E o2) + { + if(o1 == null && o2 == null) + { + return 0; + } + if(o1 == null) + { + return -1; + } + if(o2 == null) + { + return 1; + } + if(o1 instanceof final Comparable comparableGeneric) + { + final Integer comparingResult = compareWithComparable(comparableGeneric, o2); + if(comparingResult != null) + { + return comparingResult; + } + } + throw new NotComparableException(String.format( + "Type %s is not comparable. Sorting is not available for that type.", + o1.getClass().getSimpleName())); + } + + @SuppressWarnings({"rawtypes", "unchecked"}) + private static Integer compareWithComparable( + final T o1, + final E o2) + { + if(Comparable.class.isAssignableFrom(o2.getClass())) + { + return o1.compareTo(o2); + } + return null; + } + + /** + * @return {@code true} if o1 is less than o2, {@code false} if not. + */ + public static boolean isLessThan(final E o1, final E o2) + { + return compare(o1, o2) < 0; + } + + /** + * @return {@code true} if o1 is less or equal to o2, {@code false} if not. + */ + public static boolean isLessOrEqualTo(final E o1, final E o2) + { + return compare(o1, o2) <= 0; + } + + /** + * @return {@code true} if o1 is greater than o2, {@code false} if not. + */ + public static boolean isGreaterThan(final E o1, final E o2) + { + return compare(o1, o2) > 0; + } + + /** + * @return {@code true} if o1 is greater or equal to o2, {@code false} if not. + */ + public static boolean isGreaterOrEqualTo(final E o1, final E o2) + { + return compare(o1, o2) >= 0; + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/util/StringUtil.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/util/StringUtil.java new file mode 100644 index 00000000..341146f0 --- /dev/null +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/util/StringUtil.java @@ -0,0 +1,39 @@ +/* + * Copyright © 2023 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.util; + +import java.util.Objects; + +import software.xdev.spring.data.eclipse.store.exceptions.StringBlankException; + + +public class StringUtil +{ + private StringUtil() + { + // Only static methods + } + + @SuppressWarnings("UnusedReturnValue") + public static String requireNonNullAndNonBlank(final String stringToCheck) + { + if(Objects.requireNonNull(stringToCheck).isBlank()) + { + throw new StringBlankException(); + } + return stringToCheck; + } +} diff --git a/spring-data-eclipse-store/src/main/resources/META-INF/spring.factories b/spring-data-eclipse-store/src/main/resources/META-INF/spring.factories new file mode 100644 index 00000000..a0c3f157 --- /dev/null +++ b/spring-data-eclipse-store/src/main/resources/META-INF/spring.factories @@ -0,0 +1 @@ +org.springframework.data.repository.core.support.RepositoryFactorySupport=software.xdev.spring.data.eclipse.store.repository.support.EclipseStoreRepositoryFactory diff --git a/spring-data-eclipse-store/src/main/resources/META-INF/spring.handlers b/spring-data-eclipse-store/src/main/resources/META-INF/spring.handlers new file mode 100644 index 00000000..3a7d86dc --- /dev/null +++ b/spring-data-eclipse-store/src/main/resources/META-INF/spring.handlers @@ -0,0 +1 @@ +http\://www.springframework.org/schema/data/eclipse-store=software.xdev.spring.data.eclipse.store.repository.config.EclipseStoreRepositoryConfigNamespaceHandler diff --git a/spring-data-eclipse-store/src/main/resources/META-INF/spring/aot.factories b/spring-data-eclipse-store/src/main/resources/META-INF/spring/aot.factories new file mode 100644 index 00000000..1d0462f8 --- /dev/null +++ b/spring-data-eclipse-store/src/main/resources/META-INF/spring/aot.factories @@ -0,0 +1,5 @@ +org.springframework.aot.hint.RuntimeHintsRegistrar=\ + software.xdev.spring.data.eclipse.store.aot.EclipseStoreRuntimeHints + + + diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/helper/DummyWorkingCopier.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/helper/DummyWorkingCopier.java new file mode 100644 index 00000000..e92deeb6 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/helper/DummyWorkingCopier.java @@ -0,0 +1,55 @@ +/* + * Copyright © 2023 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.helper; + +import java.util.Collection; + +import software.xdev.spring.data.eclipse.store.repository.support.copier.working.WorkingCopier; +import software.xdev.spring.data.eclipse.store.repository.support.copier.working.WorkingCopierResult; + + +public class DummyWorkingCopier implements WorkingCopier +{ + @Override + public T copy(final T objectToCopy) + { + return objectToCopy; + } + + @Override + public > L copy(final L objectCollectionToCopy) + { + return objectCollectionToCopy; + } + + @Override + public WorkingCopierResult mergeBack(final T workingCopy) + { + return null; + } + + @Override + public T getOriginal(final T workingCopy) + { + return workingCopy; + } + + @Override + public void deregister(final T workingCopy) + { + + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/helper/TestData.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/helper/TestData.java new file mode 100644 index 00000000..67e7c59a --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/helper/TestData.java @@ -0,0 +1,24 @@ +/* + * Copyright © 2023 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.helper; + +public class TestData +{ + public static final String LAST_NAME = "Fleetwood"; + public static final String FIRST_NAME = "Mick"; + public static final String LAST_NAME_ALTERNATIVE = "Nicks"; + public static final String FIRST_NAME_ALTERNATIVE = "Stevie"; +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/helper/TestUtil.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/helper/TestUtil.java new file mode 100644 index 00000000..91670885 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/helper/TestUtil.java @@ -0,0 +1,64 @@ +/* + * Copyright © 2023 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.helper; + +import java.util.ArrayList; +import java.util.List; + +import org.opentest4j.AssertionFailedError; + +import software.xdev.spring.data.eclipse.store.repository.EclipseStoreStorage; + + +public class TestUtil +{ + public static List iterableToList(final Iterable iterable) + { + final List list = new ArrayList<>(); + iterable.forEach(list::add); + return list; + } + + public static void restartDatastore(final EclipseStoreStorage storage) + { + storage.stop(); + // Storage starts automatically again, if the repo is accessed + } + + public static void doBeforeAndAfterRestartOfDatastore( + final EclipseStoreStorage storage, + final Runnable thingToDoBeforeAndAfterRestart + ) + { + try + { + thingToDoBeforeAndAfterRestart.run(); + } + catch(final AssertionFailedError error) + { + throw new AssertionFailedError("Error before restart of storage", error); + } + restartDatastore(storage); + try + { + thingToDoBeforeAndAfterRestart.run(); + } + catch(final AssertionFailedError error) + { + throw new AssertionFailedError("Error after restart of storage", error); + } + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/DefaultTestAnnotations.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/DefaultTestAnnotations.java new file mode 100644 index 00000000..299800c4 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/DefaultTestAnnotations.java @@ -0,0 +1,40 @@ +/* + * Copyright © 2023 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.integration; + +import static org.springframework.test.annotation.DirtiesContext.ClassMode.BEFORE_EACH_TEST_METHOD; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.annotation.DirtiesContext; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.TestPropertySource; +import org.springframework.test.context.junit.jupiter.SpringExtension; + + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) +@ExtendWith(SpringExtension.class) +@ContextConfiguration(classes = {TestConfiguration.class}) +@DirtiesContext(classMode = BEFORE_EACH_TEST_METHOD) +@TestPropertySource("/application.properties") +public @interface DefaultTestAnnotations +{ +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/TestConfiguration.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/TestConfiguration.java new file mode 100644 index 00000000..d0f6afab --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/TestConfiguration.java @@ -0,0 +1,57 @@ +/* + * Copyright © 2023 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.integration; + +import java.nio.file.Path; + +import org.springframework.beans.factory.DisposableBean; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.event.ContextRefreshedEvent; +import org.springframework.context.event.EventListener; +import org.springframework.util.FileSystemUtils; + +import jakarta.inject.Inject; +import software.xdev.spring.data.eclipse.store.repository.EclipseStoreStorage; +import software.xdev.spring.data.eclipse.store.repository.config.EnableEclipseStoreRepositories; + + +@Configuration +@EnableEclipseStoreRepositories +public class TestConfiguration implements DisposableBean +{ + @Inject + EclipseStoreStorage storage; + + @Value("${org.eclipse.store.storage-directory}") + private String storageDirectory; + + @EventListener + public void handleContextRefresh(final ContextRefreshedEvent event) + { + // Init with empty root object + this.storage.clearData(); + } + + @Override + public void destroy() throws Exception + { + // End with empty root object + this.storage.clearData(); + this.storage.stop(); + FileSystemUtils.deleteRecursively(Path.of(this.storageDirectory)); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/Child.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/Child.java new file mode 100644 index 00000000..c0d24c1a --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/Child.java @@ -0,0 +1,82 @@ +/* + * Copyright © 2023 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.integration.repositories; + +import java.util.Objects; + + +public class Child +{ + private String firstName; + private String lastName; + + public Child(final String firstName, final String lastName) + { + this.firstName = firstName; + this.lastName = lastName; + } + + public String getFirstName() + { + return this.firstName; + } + + public void setFirstName(final String firstName) + { + this.firstName = firstName; + } + + public String getLastName() + { + return this.lastName; + } + + public void setLastName(final String lastName) + { + this.lastName = lastName; + } + + @Override + public String toString() + { + return String.format( + "Child[firstName='%s', lastName='%s']", + this.firstName, this.lastName); + } + + @Override + public boolean equals(final Object o) + { + if(this == o) + { + return true; + } + if(o == null || this.getClass() != o.getClass()) + { + return false; + } + final Child customer = (Child)o; + return Objects.equals(this.firstName, customer.firstName) && Objects.equals( + this.lastName, + customer.lastName); + } + + @Override + public int hashCode() + { + return Objects.hash(this.firstName, this.lastName); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/ChildCustomer.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/ChildCustomer.java new file mode 100644 index 00000000..7af466b3 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/ChildCustomer.java @@ -0,0 +1,37 @@ +/* + * Copyright © 2023 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.integration.repositories; + +public class ChildCustomer extends ParentCustomer +{ + private String middleName; + + public ChildCustomer(final String firstName, final String middleName, final String lastName) + { + super(firstName, lastName); + this.middleName = middleName; + } + + public String getMiddleName() + { + return this.middleName; + } + + public void setMiddleName(final String middleName) + { + this.middleName = middleName; + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/ChildCustomerRepository.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/ChildCustomerRepository.java new file mode 100644 index 00000000..46979d77 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/ChildCustomerRepository.java @@ -0,0 +1,23 @@ +/* + * Copyright © 2023 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.integration.repositories; + +import org.springframework.data.repository.CrudRepository; + + +public interface ChildCustomerRepository extends CrudRepository +{ +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/Customer.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/Customer.java new file mode 100644 index 00000000..89e7d4f7 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/Customer.java @@ -0,0 +1,89 @@ +/* + * Copyright © 2023 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.integration.repositories; + +import java.util.List; +import java.util.Objects; + + +public class Customer +{ + private String firstName; + private String lastName; + + public Customer(final String firstName, final String lastName) + { + this.firstName = firstName; + this.lastName = lastName; + } + + public String getFirstName() + { + return this.firstName; + } + + public void setFirstName(final String firstName) + { + this.firstName = firstName; + } + + public String getLastName() + { + return this.lastName; + } + + public void setLastName(final String lastName) + { + this.lastName = lastName; + } + + @Override + public String toString() + { + return String.format( + "Customer[firstName='%s', lastName='%s']", + this.firstName, this.lastName); + } + + @Override + public boolean equals(final Object o) + { + if(this == o) + { + return true; + } + if(o == null || this.getClass() != o.getClass()) + { + return false; + } + final Customer customer = (Customer)o; + return Objects.equals(this.firstName, customer.firstName) && Objects.equals( + this.lastName, + customer.lastName); + } + + @Override + public int hashCode() + { + return Objects.hash(this.firstName, this.lastName); + } + + @SuppressWarnings("OptionalGetWithoutIsPresent") + public static Customer getCustomerWithFirstName(final List customers, final String firstName) + { + return customers.stream().filter(customer -> customer.getFirstName().equals(firstName)).findFirst().get(); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerNotCrud.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerNotCrud.java new file mode 100644 index 00000000..99140aa9 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerNotCrud.java @@ -0,0 +1,62 @@ +/* + * Copyright © 2023 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.integration.repositories; + +import java.util.Objects; + + +public class CustomerNotCrud +{ + private final String firstName; + private final String lastName; + + public CustomerNotCrud(final String firstName, final String lastName) + { + this.firstName = firstName; + this.lastName = lastName; + } + + @Override + public String toString() + { + return String.format( + "Customer[firstName='%s', lastName='%s']", + this.firstName, this.lastName); + } + + @Override + public boolean equals(final Object o) + { + if(this == o) + { + return true; + } + if(o == null || this.getClass() != o.getClass()) + { + return false; + } + final CustomerNotCrud customer = (CustomerNotCrud)o; + return Objects.equals(this.firstName, customer.firstName) && Objects.equals( + this.lastName, + customer.lastName); + } + + @Override + public int hashCode() + { + return Objects.hash(this.firstName, this.lastName); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerNotCrudRepository.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerNotCrudRepository.java new file mode 100644 index 00000000..abf8c087 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerNotCrudRepository.java @@ -0,0 +1,28 @@ +/* + * Copyright © 2023 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.integration.repositories; + +import java.util.List; + +import org.springframework.data.repository.Repository; + + +public interface CustomerNotCrudRepository extends Repository +{ + List findAll(); + + void save(CustomerNotCrud customer); +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerRepository.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerRepository.java new file mode 100644 index 00000000..cd2a570b --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerRepository.java @@ -0,0 +1,45 @@ +/* + * Copyright © 2023 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.integration.repositories; + +import java.util.List; +import java.util.Optional; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.domain.Sort; +import org.springframework.data.repository.CrudRepository; +import org.springframework.data.repository.PagingAndSortingRepository; + + +public interface CustomerRepository + extends CrudRepository, PagingAndSortingRepository +{ + Optional findByFirstName(String firstName); + + Iterable findAllByLastName(String lastName); + + @Override + Page findAll(Pageable pageable); + + Page findAllByLastName(String lastName, Pageable pageable); + + List findByOrderByLastNameAsc(); + + Iterable findAllByLastName(String lastName, Sort sort); + + List findAllByFirstName(String lastName, Pageable pageable); +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerRepositoryWithHashSet.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerRepositoryWithHashSet.java new file mode 100644 index 00000000..045d6c17 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerRepositoryWithHashSet.java @@ -0,0 +1,23 @@ +/* + * Copyright © 2023 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.integration.repositories; + +import org.springframework.data.repository.CrudRepository; + + +public interface CustomerRepositoryWithHashSet extends CrudRepository +{ +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerRepositoryWithQuery.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerRepositoryWithQuery.java new file mode 100644 index 00000000..69baff3c --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerRepositoryWithQuery.java @@ -0,0 +1,36 @@ +/* + * Copyright © 2023 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.integration.repositories; + +import java.util.List; +import java.util.Optional; + +import org.springframework.data.repository.Repository; + +import software.xdev.spring.data.eclipse.store.repository.Query; + + +public interface CustomerRepositoryWithQuery extends Repository +{ + List findAll(); + + Optional findByFirstName(String firstName); + + @Query() + Iterable findAllByLastName(String lastName); + + void save(CustomerWithQuery customer); +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithChild.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithChild.java new file mode 100644 index 00000000..668e67f2 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithChild.java @@ -0,0 +1,104 @@ +/* + * Copyright © 2023 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.integration.repositories; + +import java.util.List; +import java.util.Objects; + + +public class CustomerWithChild +{ + private String firstName; + private String lastName; + + private Child child; + + public CustomerWithChild(final String firstName, final String lastName, final Child child) + { + this.firstName = firstName; + this.lastName = lastName; + this.child = child; + } + + public String getFirstName() + { + return this.firstName; + } + + public void setFirstName(final String firstName) + { + this.firstName = firstName; + } + + public String getLastName() + { + return this.lastName; + } + + public void setLastName(final String lastName) + { + this.lastName = lastName; + } + + public Child getChild() + { + return this.child; + } + + public void setChild(final Child child) + { + this.child = child; + } + + @Override + public String toString() + { + return String.format( + "Customer[firstName='%s', lastName='%s']", + this.firstName, this.lastName); + } + + @Override + public boolean equals(final Object o) + { + if(this == o) + { + return true; + } + if(o == null || this.getClass() != o.getClass()) + { + return false; + } + final CustomerWithChild customer = (CustomerWithChild)o; + return Objects.equals(this.firstName, customer.firstName) && Objects.equals( + this.lastName, + customer.lastName); + } + + @Override + public int hashCode() + { + return Objects.hash(this.firstName, this.lastName); + } + + @SuppressWarnings("OptionalGetWithoutIsPresent") + public static CustomerWithChild getCustomerWithFirstName( + final List customers, + final String firstName) + { + return customers.stream().filter(customer -> customer.getFirstName().equals(firstName)).findFirst().get(); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithChildRepository.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithChildRepository.java new file mode 100644 index 00000000..65a8cf5e --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithChildRepository.java @@ -0,0 +1,26 @@ +/* + * Copyright © 2023 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.integration.repositories; + +import java.util.Optional; + +import org.springframework.data.repository.CrudRepository; + + +public interface CustomerWithChildRepository extends CrudRepository +{ + Optional findByChild(Child child); +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithHashSet.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithHashSet.java new file mode 100644 index 00000000..e6a2c95c --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithHashSet.java @@ -0,0 +1,99 @@ +/* + * Copyright © 2023 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.integration.repositories; + +import java.util.HashSet; +import java.util.List; +import java.util.Objects; + + +public class CustomerWithHashSet +{ + private String firstName; + private String lastName; + + private final HashSet values = new HashSet<>(); + + public CustomerWithHashSet(final String firstName, final String lastName) + { + this.firstName = firstName; + this.lastName = lastName; + } + + public String getFirstName() + { + return this.firstName; + } + + public void setFirstName(final String firstName) + { + this.firstName = firstName; + } + + public String getLastName() + { + return this.lastName; + } + + public void setLastName(final String lastName) + { + this.lastName = lastName; + } + + public HashSet getValues() + { + return this.values; + } + + @Override + public String toString() + { + return String.format( + "Customer[firstName='%s', lastName='%s']", + this.firstName, this.lastName); + } + + @Override + public boolean equals(final Object o) + { + if(this == o) + { + return true; + } + if(o == null || this.getClass() != o.getClass()) + { + return false; + } + final CustomerWithHashSet customer = (CustomerWithHashSet)o; + return Objects.equals(this.firstName, customer.firstName) && Objects.equals( + this.lastName, + customer.lastName); + } + + @Override + public int hashCode() + { + return Objects.hash(this.firstName, this.lastName); + } + + @SuppressWarnings("OptionalGetWithoutIsPresent") + public static CustomerWithHashSet getCustomerWithFirstName( + final List customers, + final String firstName) + { + return customers.stream().filter(customer -> customer.getFirstName().equals(firstName)).findFirst().get(); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithQuery.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithQuery.java new file mode 100644 index 00000000..a4ad8257 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithQuery.java @@ -0,0 +1,72 @@ +/* + * Copyright © 2023 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.integration.repositories; + +import java.util.Objects; + + +public class CustomerWithQuery +{ + private final String firstName; + private final String lastName; + + public CustomerWithQuery(final String firstName, final String lastName) + { + this.firstName = firstName; + this.lastName = lastName; + } + + public String getFirstName() + { + return this.firstName; + } + + public String getLastName() + { + return this.lastName; + } + + @Override + public String toString() + { + return String.format( + "Customer[firstName='%s', lastName='%s']", + this.firstName, this.lastName); + } + + @Override + public boolean equals(final Object o) + { + if(this == o) + { + return true; + } + if(o == null || this.getClass() != o.getClass()) + { + return false; + } + final CustomerWithQuery customer = (CustomerWithQuery)o; + return Objects.equals(this.firstName, customer.firstName) && Objects.equals( + this.lastName, + customer.lastName); + } + + @Override + public int hashCode() + { + return Objects.hash(this.firstName, this.lastName); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/Node.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/Node.java new file mode 100644 index 00000000..a005fda9 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/Node.java @@ -0,0 +1,68 @@ +/* + * Copyright © 2023 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.integration.repositories; + +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; + + +public class Node +{ + private String name; + + private final List children; + + public Node(final String name, final List children) + { + this.name = name; + this.children = children; + } + + public Node(final String name) + { + this(name, new ArrayList<>()); + } + + public String getName() + { + return this.name; + } + + public void setName(final String name) + { + this.name = name; + } + + public List getChildren() + { + return this.children; + } + + @Override + public String toString() + { + return "Node{" + + "name='" + this.name + '\'' + + ", children=" + this.children.size() + + '}'; + } + + public static Optional getNodeWithName(final List nodes, final String name) + { + return nodes.stream().filter(node -> node.getName().equals(name)).findFirst(); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/NodeRepository.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/NodeRepository.java new file mode 100644 index 00000000..53555be9 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/NodeRepository.java @@ -0,0 +1,23 @@ +/* + * Copyright © 2023 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.integration.repositories; + +import org.springframework.data.repository.CrudRepository; + + +public interface NodeRepository extends CrudRepository +{ +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/Owner.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/Owner.java new file mode 100644 index 00000000..f49d78f4 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/Owner.java @@ -0,0 +1,87 @@ +/* + * Copyright © 2023 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.integration.repositories; + +import java.util.List; +import java.util.Objects; + + +public class Owner +{ + private String firstName; + private String lastName; + + public Owner(final String firstName, final String lastName) + { + this.firstName = firstName; + this.lastName = lastName; + } + + public String getFirstName() + { + return this.firstName; + } + + public void setFirstName(final String firstName) + { + this.firstName = firstName; + } + + public String getLastName() + { + return this.lastName; + } + + public void setLastName(final String lastName) + { + this.lastName = lastName; + } + + @Override + public String toString() + { + return String.format( + "Owner[firstName='%s', lastName='%s']", + this.firstName, this.lastName); + } + + @Override + public boolean equals(final Object o) + { + if(this == o) + { + return true; + } + if(o == null || this.getClass() != o.getClass()) + { + return false; + } + final Owner owner = (Owner)o; + return Objects.equals(this.firstName, owner.firstName) && Objects.equals(this.lastName, owner.lastName); + } + + @Override + public int hashCode() + { + return Objects.hash(this.firstName, this.lastName); + } + + @SuppressWarnings("OptionalGetWithoutIsPresent") + public static Owner getOwnerWithFirstName(final List owners, final String firstName) + { + return owners.stream().filter(owner -> owner.getFirstName().equals(firstName)).findFirst().get(); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/OwnerRepository.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/OwnerRepository.java new file mode 100644 index 00000000..e3b5b5dc --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/OwnerRepository.java @@ -0,0 +1,23 @@ +/* + * Copyright © 2023 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.integration.repositories; + +import org.springframework.data.repository.CrudRepository; + + +public interface OwnerRepository extends CrudRepository +{ +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/ParentCustomer.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/ParentCustomer.java new file mode 100644 index 00000000..c897bc62 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/ParentCustomer.java @@ -0,0 +1,89 @@ +/* + * Copyright © 2023 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.integration.repositories; + +import java.util.List; +import java.util.Objects; + + +public class ParentCustomer +{ + private String firstName; + private String lastName; + + public ParentCustomer(final String firstName, final String lastName) + { + this.firstName = firstName; + this.lastName = lastName; + } + + public String getFirstName() + { + return this.firstName; + } + + public void setFirstName(final String firstName) + { + this.firstName = firstName; + } + + public String getLastName() + { + return this.lastName; + } + + public void setLastName(final String lastName) + { + this.lastName = lastName; + } + + @Override + public String toString() + { + return String.format( + "Customer[firstName='%s', lastName='%s']", + this.firstName, this.lastName); + } + + @Override + public boolean equals(final Object o) + { + if(this == o) + { + return true; + } + if(o == null || this.getClass() != o.getClass()) + { + return false; + } + final ParentCustomer customer = (ParentCustomer)o; + return Objects.equals(this.firstName, customer.firstName) && Objects.equals( + this.lastName, + customer.lastName); + } + + @Override + public int hashCode() + { + return Objects.hash(this.firstName, this.lastName); + } + + @SuppressWarnings("OptionalGetWithoutIsPresent") + public static ParentCustomer getCustomerWithFirstName(final List customers, final String firstName) + { + return customers.stream().filter(customer -> customer.getFirstName().equals(firstName)).findFirst().get(); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/ParentCustomerRepository.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/ParentCustomerRepository.java new file mode 100644 index 00000000..a76780b6 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/ParentCustomerRepository.java @@ -0,0 +1,25 @@ +/* + * Copyright © 2023 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.integration.repositories; + +import org.springframework.data.repository.CrudRepository; +import org.springframework.data.repository.PagingAndSortingRepository; + + +public interface ParentCustomerRepository + extends CrudRepository, PagingAndSortingRepository +{ +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/SubCustomer.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/SubCustomer.java new file mode 100644 index 00000000..d7cd1a98 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/SubCustomer.java @@ -0,0 +1,24 @@ +/* + * Copyright © 2023 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.integration.repositories; + +public class SubCustomer extends Customer +{ + public SubCustomer(final String firstName, final String lastName) + { + super(firstName, lastName); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/SubCustomerRepository.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/SubCustomerRepository.java new file mode 100644 index 00000000..e95e3785 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/SubCustomerRepository.java @@ -0,0 +1,24 @@ +/* + * Copyright © 2023 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.integration.repositories; + +import org.springframework.data.repository.CrudRepository; + + +public interface SubCustomerRepository extends CrudRepository +{ + SubCustomer findByFirstName(String firstName); +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdInt.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdInt.java new file mode 100644 index 00000000..ba16d8d4 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdInt.java @@ -0,0 +1,98 @@ +/* + * Copyright © 2023 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.integration.repositories.id; + +import java.util.List; +import java.util.Objects; + +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; + + +public class CustomerWithIdInt +{ + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private int id; + + private String firstName; + private String lastName; + + public CustomerWithIdInt() + { + } + + public CustomerWithIdInt(final String firstName, final String lastName) + { + this.firstName = firstName; + this.lastName = lastName; + } + + public String getFirstName() + { + return this.firstName; + } + + public String getLastName() + { + return this.lastName; + } + + public Integer getId() + { + return this.id; + } + + @Override + public String toString() + { + return String.format( + "Customer[firstName='%s', lastName='%s']", + this.firstName, this.lastName); + } + + @Override + public boolean equals(final Object o) + { + if(this == o) + { + return true; + } + if(o == null || this.getClass() != o.getClass()) + { + return false; + } + final CustomerWithIdInt customer = (CustomerWithIdInt)o; + return Objects.equals(this.firstName, customer.firstName) && Objects.equals( + this.lastName, + customer.lastName); + } + + @Override + public int hashCode() + { + return Objects.hash(this.firstName, this.lastName); + } + + @SuppressWarnings("OptionalGetWithoutIsPresent") + public static CustomerWithIdInt getCustomerWithFirstName( + final List customers, + final String firstName) + { + return customers.stream().filter(customer -> customer.getFirstName().equals(firstName)).findFirst().get(); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdIntRepository.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdIntRepository.java new file mode 100644 index 00000000..b000d441 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdIntRepository.java @@ -0,0 +1,23 @@ +/* + * Copyright © 2023 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.integration.repositories.id; + +import org.springframework.data.repository.CrudRepository; + + +public interface CustomerWithIdIntRepository extends CrudRepository +{ +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdInteger.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdInteger.java new file mode 100644 index 00000000..096d2466 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdInteger.java @@ -0,0 +1,98 @@ +/* + * Copyright © 2023 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.integration.repositories.id; + +import java.util.List; +import java.util.Objects; + +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; + + +public class CustomerWithIdInteger +{ + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private Integer id; + + private String firstName; + private String lastName; + + public CustomerWithIdInteger() + { + } + + public CustomerWithIdInteger(final String firstName, final String lastName) + { + this.firstName = firstName; + this.lastName = lastName; + } + + public String getFirstName() + { + return this.firstName; + } + + public String getLastName() + { + return this.lastName; + } + + public Integer getId() + { + return this.id; + } + + @Override + public String toString() + { + return String.format( + "Customer[firstName='%s', lastName='%s']", + this.firstName, this.lastName); + } + + @Override + public boolean equals(final Object o) + { + if(this == o) + { + return true; + } + if(o == null || this.getClass() != o.getClass()) + { + return false; + } + final CustomerWithIdInteger customer = (CustomerWithIdInteger)o; + return Objects.equals(this.firstName, customer.firstName) && Objects.equals( + this.lastName, + customer.lastName); + } + + @Override + public int hashCode() + { + return Objects.hash(this.firstName, this.lastName); + } + + @SuppressWarnings("OptionalGetWithoutIsPresent") + public static CustomerWithIdInteger getCustomerWithFirstName( + final List customers, + final String firstName) + { + return customers.stream().filter(customer -> customer.getFirstName().equals(firstName)).findFirst().get(); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdIntegerNoAutoGenerate.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdIntegerNoAutoGenerate.java new file mode 100644 index 00000000..5fa96ed0 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdIntegerNoAutoGenerate.java @@ -0,0 +1,96 @@ +/* + * Copyright © 2023 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.integration.repositories.id; + +import java.util.List; +import java.util.Objects; + +import jakarta.persistence.Id; + + +public class CustomerWithIdIntegerNoAutoGenerate +{ + @Id + private Integer id; + + private String firstName; + private String lastName; + + public CustomerWithIdIntegerNoAutoGenerate() + { + } + + public CustomerWithIdIntegerNoAutoGenerate(final Integer id, final String firstName, final String lastName) + { + this.id = id; + this.firstName = firstName; + this.lastName = lastName; + } + + public String getFirstName() + { + return this.firstName; + } + + public String getLastName() + { + return this.lastName; + } + + public Integer getId() + { + return this.id; + } + + @Override + public String toString() + { + return String.format( + "Customer[firstName='%s', lastName='%s']", + this.firstName, this.lastName); + } + + @Override + public boolean equals(final Object o) + { + if(this == o) + { + return true; + } + if(o == null || this.getClass() != o.getClass()) + { + return false; + } + final CustomerWithIdIntegerNoAutoGenerate customer = (CustomerWithIdIntegerNoAutoGenerate)o; + return Objects.equals(this.firstName, customer.firstName) && Objects.equals( + this.lastName, + customer.lastName); + } + + @Override + public int hashCode() + { + return Objects.hash(this.firstName, this.lastName); + } + + @SuppressWarnings("OptionalGetWithoutIsPresent") + public static CustomerWithIdIntegerNoAutoGenerate getCustomerWithFirstName( + final List customers, + final String firstName) + { + return customers.stream().filter(customer -> customer.getFirstName().equals(firstName)).findFirst().get(); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdIntegerNoAutoGenerateRepository.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdIntegerNoAutoGenerateRepository.java new file mode 100644 index 00000000..c86528c3 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdIntegerNoAutoGenerateRepository.java @@ -0,0 +1,24 @@ +/* + * Copyright © 2023 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.integration.repositories.id; + +import org.springframework.data.repository.CrudRepository; + + +public interface CustomerWithIdIntegerNoAutoGenerateRepository + extends CrudRepository +{ +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdIntegerRepository.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdIntegerRepository.java new file mode 100644 index 00000000..79a534da --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdIntegerRepository.java @@ -0,0 +1,23 @@ +/* + * Copyright © 2023 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.integration.repositories.id; + +import org.springframework.data.repository.CrudRepository; + + +public interface CustomerWithIdIntegerRepository extends CrudRepository +{ +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdLong.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdLong.java new file mode 100644 index 00000000..e2c003ce --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdLong.java @@ -0,0 +1,85 @@ +/* + * Copyright © 2023 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.integration.repositories.id; + +import java.util.Objects; + +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; + + +public class CustomerWithIdLong +{ + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private Long id; + + private final String firstName; + private final String lastName; + + public CustomerWithIdLong(final String firstName, final String lastName) + { + this.firstName = firstName; + this.lastName = lastName; + } + + public String getFirstName() + { + return this.firstName; + } + + public String getLastName() + { + return this.lastName; + } + + public Long getId() + { + return this.id; + } + + @Override + public String toString() + { + return String.format( + "Customer[firstName='%s', lastName='%s']", + this.firstName, this.lastName); + } + + @Override + public boolean equals(final Object o) + { + if(this == o) + { + return true; + } + if(o == null || this.getClass() != o.getClass()) + { + return false; + } + final CustomerWithIdLong customer = (CustomerWithIdLong)o; + return Objects.equals(this.firstName, customer.firstName) && Objects.equals( + this.lastName, + customer.lastName); + } + + @Override + public int hashCode() + { + return Objects.hash(this.firstName, this.lastName); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdLongRepository.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdLongRepository.java new file mode 100644 index 00000000..29f340f0 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdLongRepository.java @@ -0,0 +1,23 @@ +/* + * Copyright © 2023 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.integration.repositories.id; + +import org.springframework.data.repository.CrudRepository; + + +public interface CustomerWithIdLongRepository extends CrudRepository +{ +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdString.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdString.java new file mode 100644 index 00000000..43045152 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdString.java @@ -0,0 +1,80 @@ +/* + * Copyright © 2023 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.integration.repositories.id; + +import java.util.Objects; + +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; + + +public class CustomerWithIdString +{ + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private String id; + + private final String firstName; + private final String lastName; + + public CustomerWithIdString(final String firstName, final String lastName) + { + this.firstName = firstName; + this.lastName = lastName; + } + + public String getFirstName() + { + return this.firstName; + } + + public String getLastName() + { + return this.lastName; + } + + @Override + public String toString() + { + return String.format( + "Customer[firstName='%s', lastName='%s']", + this.firstName, this.lastName); + } + + @Override + public boolean equals(final Object o) + { + if(this == o) + { + return true; + } + if(o == null || this.getClass() != o.getClass()) + { + return false; + } + final CustomerWithIdString customer = (CustomerWithIdString)o; + return Objects.equals(this.firstName, customer.firstName) && Objects.equals( + this.lastName, + customer.lastName); + } + + @Override + public int hashCode() + { + return Objects.hash(this.firstName, this.lastName); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdStringRepository.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdStringRepository.java new file mode 100644 index 00000000..85e75ec9 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithIdStringRepository.java @@ -0,0 +1,23 @@ +/* + * Copyright © 2023 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.integration.repositories.id; + +import org.springframework.data.repository.CrudRepository; + + +public interface CustomerWithIdStringRepository extends CrudRepository +{ +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithPurchase.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithPurchase.java new file mode 100644 index 00000000..69e1e80d --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithPurchase.java @@ -0,0 +1,108 @@ +/* + * Copyright © 2023 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.integration.repositories.id; + +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; + + +public class CustomerWithPurchase +{ + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private Integer id; + + private String firstName; + private String lastName; + + private final List purchases; + + public CustomerWithPurchase() + { + this.purchases = new ArrayList<>(); + } + + public CustomerWithPurchase(final String firstName, final String lastName) + { + this(); + this.firstName = firstName; + this.lastName = lastName; + } + + public String getFirstName() + { + return this.firstName; + } + + public String getLastName() + { + return this.lastName; + } + + public List getPurchases() + { + return this.purchases; + } + + public void addPurchase(final Purchase newPurchase) + { + this.purchases.add(newPurchase); + } + + @Override + public String toString() + { + return String.format( + "Customer[firstName='%s', lastName='%s']", + this.firstName, this.lastName); + } + + @Override + public boolean equals(final Object o) + { + if(this == o) + { + return true; + } + if(o == null || this.getClass() != o.getClass()) + { + return false; + } + final CustomerWithPurchase customer = (CustomerWithPurchase)o; + return Objects.equals(this.firstName, customer.firstName) && Objects.equals( + this.lastName, + customer.lastName); + } + + @Override + public int hashCode() + { + return Objects.hash(this.firstName, this.lastName); + } + + @SuppressWarnings("OptionalGetWithoutIsPresent") + public static CustomerWithPurchase getCustomerWithLastName( + final List customers, + final String lastName) + { + return customers.stream().filter(customer -> customer.getLastName().equals(lastName)).findFirst().get(); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithPurchaseRepository.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithPurchaseRepository.java new file mode 100644 index 00000000..aa8264e3 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/CustomerWithPurchaseRepository.java @@ -0,0 +1,23 @@ +/* + * Copyright © 2023 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.integration.repositories.id; + +import org.springframework.data.repository.CrudRepository; + + +public interface CustomerWithPurchaseRepository extends CrudRepository +{ +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/Purchase.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/Purchase.java new file mode 100644 index 00000000..69479540 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/id/Purchase.java @@ -0,0 +1,68 @@ +/* + * Copyright © 2023 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.integration.repositories.id; + +import java.util.Objects; + +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; + + +public class Purchase +{ + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private Integer id; + + private final String productName; + + public Purchase(final String productName) + { + this.productName = productName; + } + + public String getProductName() + { + return this.productName; + } + + public Integer getId() + { + return this.id; + } + + @Override + public boolean equals(final Object o) + { + if(this == o) + { + return true; + } + if(o == null || this.getClass() != o.getClass()) + { + return false; + } + final Purchase purchase = (Purchase)o; + return Objects.equals(this.id, purchase.id) && Objects.equals(this.productName, purchase.productName); + } + + @Override + public int hashCode() + { + return Objects.hash(this.id, this.productName); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/Article.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/Article.java new file mode 100644 index 00000000..dd418fcb --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/Article.java @@ -0,0 +1,56 @@ +/* + * Copyright © 2023 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.integration.repositories.real.life.example; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + + +public class Article +{ + private final String name; + private final ArticleGroup group; + private final List warehouses; + + public Article(final String name, final ArticleGroup group, final List warehouses) + { + this.name = name; + this.group = group; + this.warehouses = warehouses; + this.warehouses.forEach(warehouse -> warehouse.getArticles().add(this)); + } + + public Article(final String name, final ArticleGroup group, final Warehouse warehouse) + { + this(name, group, new ArrayList<>(Collections.singletonList(warehouse))); + } + + public String getName() + { + return this.name; + } + + public ArticleGroup getGroup() + { + return this.group; + } + + public List getWarehouses() + { + return this.warehouses; + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/ArticleGroup.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/ArticleGroup.java new file mode 100644 index 00000000..fd6e4bac --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/ArticleGroup.java @@ -0,0 +1,31 @@ +/* + * Copyright © 2023 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.integration.repositories.real.life.example; + +public class ArticleGroup +{ + private final String name; + + public ArticleGroup(final String name) + { + this.name = name; + } + + public String getName() + { + return this.name; + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/Invoice.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/Invoice.java new file mode 100644 index 00000000..bcd356d3 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/Invoice.java @@ -0,0 +1,34 @@ +/* + * Copyright © 2023 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.integration.repositories.real.life.example; + +import java.util.List; + + +public class Invoice +{ + private final List positions; + + public Invoice(final List positions) + { + this.positions = positions; + } + + public List getPositions() + { + return this.positions; + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/InvoiceRepository.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/InvoiceRepository.java new file mode 100644 index 00000000..93c9e286 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/InvoiceRepository.java @@ -0,0 +1,23 @@ +/* + * Copyright © 2023 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.integration.repositories.real.life.example; + +import org.springframework.data.repository.CrudRepository; + + +public interface InvoiceRepository extends CrudRepository +{ +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/Position.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/Position.java new file mode 100644 index 00000000..0e7515c0 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/Position.java @@ -0,0 +1,49 @@ +/* + * Copyright © 2023 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.integration.repositories.real.life.example; + +import java.util.List; +import java.util.Optional; + + +public class Position +{ + private final Article article; + private final int amount; + + public Position(final Article article, final int amount) + { + this.article = article; + this.amount = amount; + } + + public Article getArticle() + { + return this.article; + } + + public int getAmount() + { + return this.amount; + } + + public static Optional getPositionWithArticleWithName( + final List positions, + final String articleName) + { + return positions.stream().filter(pos -> pos.getArticle().getName().equals(articleName)).findFirst(); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/PositionRepository.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/PositionRepository.java new file mode 100644 index 00000000..d7e98068 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/PositionRepository.java @@ -0,0 +1,23 @@ +/* + * Copyright © 2023 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.integration.repositories.real.life.example; + +import org.springframework.data.repository.CrudRepository; + + +public interface PositionRepository extends CrudRepository +{ +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/Warehouse.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/Warehouse.java new file mode 100644 index 00000000..8b8f4f6b --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/Warehouse.java @@ -0,0 +1,41 @@ +/* + * Copyright © 2023 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.integration.repositories.real.life.example; + +import java.util.HashSet; +import java.util.Set; + + +public class Warehouse +{ + private String name; + private final Set
articles = new HashSet<>(); + + public Set
getArticles() + { + return this.articles; + } + + public String getName() + { + return this.name; + } + + public void setName(final String name) + { + this.name = name; + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/ChangeRootTests.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/ChangeRootTests.java new file mode 100644 index 00000000..d4682fbe --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/ChangeRootTests.java @@ -0,0 +1,123 @@ +/* + * Copyright © 2023 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.integration.tests; + +import java.util.List; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +import jakarta.inject.Inject; +import software.xdev.spring.data.eclipse.store.helper.TestUtil; +import software.xdev.spring.data.eclipse.store.integration.DefaultTestAnnotations; +import software.xdev.spring.data.eclipse.store.integration.repositories.Node; +import software.xdev.spring.data.eclipse.store.integration.repositories.NodeRepository; +import software.xdev.spring.data.eclipse.store.repository.EclipseStoreStorage; + + +@DefaultTestAnnotations +public class ChangeRootTests +{ + public static final String CHILD_1 = "child1"; + public static final String CHILD_2 = "child2"; + public static final String PARENT_1 = "parent1"; + public static final String PARENT_2 = "parent2"; + + @Inject + private NodeRepository repository; + @Inject + private EclipseStoreStorage storage; + + //@formatter:off + /** + * ┍-□ □ □-| => □ └-□ □ + **/ + //@formatter:on + @Test + void testSaveParentAndFindAll() + { + final Node childNode1 = new Node(CHILD_1); + final Node childNode2 = new Node(CHILD_2); + final Node parentNode = new Node(PARENT_1, List.of(childNode1, childNode2)); + this.repository.save(parentNode); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List nodes = TestUtil.iterableToList(this.repository.findAll()); + Assertions.assertEquals(3, nodes.size()); + Assertions.assertTrue(Node.getNodeWithName(nodes, PARENT_1).isPresent()); + Assertions.assertTrue(Node.getNodeWithName(nodes, CHILD_1).isPresent()); + Assertions.assertTrue(Node.getNodeWithName(nodes, CHILD_2).isPresent()); + } + ); + } + + //@formatter:off + /** + * □-□ + * □-┘ + **/ + //@formatter:on + @Test + void testSaveRecursive() + { + final Node childNode1 = new Node(CHILD_1); + final Node parentNode1 = new Node(PARENT_1, List.of(childNode1)); + final Node parentNode2 = new Node(PARENT_2); + childNode1.getChildren().add(parentNode2); + this.repository.save(parentNode1); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List nodes = TestUtil.iterableToList(this.repository.findAll()); + Assertions.assertEquals(3, nodes.size()); + Assertions.assertTrue(Node.getNodeWithName(nodes, PARENT_1).isPresent()); + Assertions.assertTrue(Node.getNodeWithName(nodes, CHILD_1).isPresent()); + Assertions.assertTrue(Node.getNodeWithName(nodes, PARENT_2).isPresent()); + } + ); + } + + //@formatter:off + /** + * ┍-□ + * □-| + * └-□ + **/ + //@formatter:on + @Test + void testSaveGraph() + { + final Node childNode1 = new Node(CHILD_1); + final Node childNode2 = new Node(CHILD_2); + final Node parentNode = new Node(PARENT_1, List.of(childNode1, childNode2)); + childNode2.getChildren().add(parentNode); + this.repository.save(parentNode); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List nodes = TestUtil.iterableToList(this.repository.findAll()); + Assertions.assertEquals(3, nodes.size()); + Assertions.assertTrue(Node.getNodeWithName(nodes, PARENT_1).isPresent()); + Assertions.assertTrue(Node.getNodeWithName(nodes, CHILD_1).isPresent()); + Assertions.assertTrue(Node.getNodeWithName(nodes, CHILD_2).isPresent()); + } + ); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/ConcurrencyTest.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/ConcurrencyTest.java new file mode 100644 index 00000000..0f7ec64a --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/ConcurrencyTest.java @@ -0,0 +1,205 @@ +/* + * Copyright © 2023 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.integration.tests; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static software.xdev.spring.data.eclipse.store.helper.TestUtil.restartDatastore; + +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.TimeUnit; +import java.util.stream.IntStream; + +import org.apache.logging.log4j.util.Strings; +import org.junit.jupiter.api.Test; + +import jakarta.inject.Inject; +import software.xdev.spring.data.eclipse.store.helper.TestUtil; +import software.xdev.spring.data.eclipse.store.integration.DefaultTestAnnotations; +import software.xdev.spring.data.eclipse.store.integration.repositories.Customer; +import software.xdev.spring.data.eclipse.store.integration.repositories.CustomerRepository; +import software.xdev.spring.data.eclipse.store.repository.EclipseStoreStorage; + + +@SuppressWarnings("OptionalGetWithoutIsPresent") +@DefaultTestAnnotations +class ConcurrencyTest +{ + public static final String CUSTOMER_NO = "Customer No."; + @Inject + private CustomerRepository repository; + + @Inject + private EclipseStoreStorage storage; + + private final List testCustomers = + IntStream.range(1, 100).mapToObj((i) -> new Customer(CUSTOMER_NO + i, "")).toList(); + + @Test + void testSaveConcurrently() throws InterruptedException + { + final ExecutorService service = Executors.newFixedThreadPool(10); + final CountDownLatch latch = new CountDownLatch(this.testCustomers.size()); + this.testCustomers.forEach( + customer -> + service.execute(() -> + { + this.repository.save(customer); + latch.countDown(); + } + ) + ); + + assertTrue(latch.await(5, TimeUnit.SECONDS)); + + final List customers = TestUtil.iterableToList(this.repository.findAll()); + assertEquals(this.testCustomers.size(), customers.size()); + + restartDatastore(this.storage); + final List customers2 = TestUtil.iterableToList(this.repository.findAll()); + assertEquals(this.testCustomers.size(), customers2.size()); + } + + @Test + void testDeleteConcurrently() throws InterruptedException + { + this.repository.saveAll(this.testCustomers); + final ExecutorService service = Executors.newFixedThreadPool(10); + final CountDownLatch latch = new CountDownLatch(this.testCustomers.size()); + this.testCustomers.forEach( + customer -> + service.execute(() -> + { + this.repository.delete(customer); + latch.countDown(); + } + ) + ); + + assertTrue(latch.await(5, TimeUnit.SECONDS)); + + final List customers2 = TestUtil.iterableToList(this.repository.findAll()); + assertTrue(customers2.isEmpty()); + + restartDatastore(this.storage); + final List customers3 = TestUtil.iterableToList(this.repository.findAll()); + assertTrue(customers3.isEmpty()); + } + + /** + * Concurrent changes may result in unclear results, but this test ensures that there are no errors while doing + * that. + */ + @Test + void testChangeConcurrently() throws InterruptedException + { + this.repository.saveAll(this.testCustomers); + final ExecutorService service = Executors.newFixedThreadPool(10); + final CountDownLatch latch = new CountDownLatch(this.testCustomers.size()); + this.testCustomers.forEach( + customer -> + service.execute(() -> + { + final Customer existingCustomer = this.repository.findByFirstName(CUSTOMER_NO + 1).get(); + existingCustomer.setLastName("something"); + this.repository.save(existingCustomer); + latch.countDown(); + } + ) + ); + + assertTrue(latch.await(5, TimeUnit.SECONDS)); + + final Customer customer = this.repository.findByFirstName(CUSTOMER_NO + 1).get(); + assertTrue(Strings.isNotEmpty(customer.getFirstName())); + } + + /** + * Here should be tested if different customer can simultaneously be read. + */ + @Test + void testReadConcurrentlyDifferentCustomers() throws InterruptedException + { + this.repository.saveAll(this.testCustomers); + + final ExecutorService service = Executors.newFixedThreadPool(10); + final CountDownLatch latch = new CountDownLatch(this.testCustomers.size()); + this.testCustomers.forEach( + customer -> + service.execute(() -> + { + final Optional existingCustomer = + this.repository.findByFirstName(customer.getFirstName()); + assertTrue(existingCustomer.isPresent()); + latch.countDown(); + } + ) + ); + assertTrue(latch.await(5, TimeUnit.SECONDS)); + } + + /** + * Here should be tested if the same customer can simultaneously be read. + */ + @Test + void testReadConcurrentlySameCustomer() throws InterruptedException + { + this.repository.saveAll(this.testCustomers); + final ExecutorService service = Executors.newFixedThreadPool(10); + final CountDownLatch latch = new CountDownLatch(this.testCustomers.size()); + this.testCustomers.forEach( + customer -> + service.execute(() -> + { + final Optional existingCustomer = + this.repository.findByFirstName(CUSTOMER_NO + 1); + assertTrue(existingCustomer.isPresent()); + latch.countDown(); + } + ) + ); + assertTrue(latch.await(5, TimeUnit.SECONDS)); + } + + /** + * Here should be tested if the same customer can simultaneously be read. + */ + @Test + void testReadConcurrentlyAllCustomers() throws InterruptedException + { + this.repository.saveAll(this.testCustomers); + + final ExecutorService service = Executors.newFixedThreadPool(10); + final CountDownLatch latch = new CountDownLatch(this.testCustomers.size()); + this.testCustomers.forEach( + customer -> + service.execute(() -> + { + final List existingCustomers = + TestUtil.iterableToList(this.repository.findAll()); + assertEquals(this.testCustomers.size(), existingCustomers.size()); + latch.countDown(); + } + ) + ); + + assertTrue(latch.await(5, TimeUnit.SECONDS)); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/HashSetTest.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/HashSetTest.java new file mode 100644 index 00000000..a68824bb --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/HashSetTest.java @@ -0,0 +1,98 @@ +/* + * Copyright © 2023 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.integration.tests; + +import java.util.List; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import jakarta.inject.Inject; +import software.xdev.spring.data.eclipse.store.helper.TestData; +import software.xdev.spring.data.eclipse.store.helper.TestUtil; +import software.xdev.spring.data.eclipse.store.integration.DefaultTestAnnotations; +import software.xdev.spring.data.eclipse.store.integration.repositories.CustomerRepositoryWithHashSet; +import software.xdev.spring.data.eclipse.store.integration.repositories.CustomerWithHashSet; +import software.xdev.spring.data.eclipse.store.repository.EclipseStoreStorage; + + +@DefaultTestAnnotations +class HashSetTest +{ + @Inject + private CustomerRepositoryWithHashSet repository; + + @Inject + private EclipseStoreStorage storage; + + @Test + void testSaveAndFindAll() + { + final CustomerWithHashSet customer = new CustomerWithHashSet(TestData.FIRST_NAME, TestData.LAST_NAME); + customer.getValues().add("Test"); + this.repository.save(customer); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List customers = TestUtil.iterableToList(this.repository.findAll()); + Assertions.assertEquals(1, customers.size()); + Assertions.assertEquals(1, customers.get(0).getValues().size()); + } + ); + } + + // TODO: Fix this. + @Test + @Disabled("Is not fixed yet, but will be.") + void testDoubleSaveAndFindAll() + { + final CustomerWithHashSet customer = new CustomerWithHashSet(TestData.FIRST_NAME, TestData.LAST_NAME); + this.repository.save(customer); + customer.getValues().add("Test"); + this.repository.save(customer); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List customers = TestUtil.iterableToList(this.repository.findAll()); + Assertions.assertEquals(1, customers.size()); + Assertions.assertEquals(1, customers.get(0).getValues().size()); + } + ); + } + + @Test + void testDoubleSaveWithNewInstanceAndFindAll() + { + final CustomerWithHashSet customer = new CustomerWithHashSet(TestData.FIRST_NAME, TestData.LAST_NAME); + this.repository.save(customer); + + final CustomerWithHashSet reloadedCustomer = TestUtil.iterableToList(this.repository.findAll()).get(0); + reloadedCustomer.getValues().add("Test"); + this.repository.save(reloadedCustomer); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List customers = TestUtil.iterableToList(this.repository.findAll()); + Assertions.assertEquals(1, customers.size()); + Assertions.assertEquals(1, customers.get(0).getValues().size()); + } + ); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/IdTest.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/IdTest.java new file mode 100644 index 00000000..1620a796 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/IdTest.java @@ -0,0 +1,392 @@ +/* + * Copyright © 2023 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.integration.tests; + +import java.util.List; +import java.util.Optional; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; + +import jakarta.inject.Inject; +import software.xdev.spring.data.eclipse.store.helper.TestData; +import software.xdev.spring.data.eclipse.store.helper.TestUtil; +import software.xdev.spring.data.eclipse.store.integration.DefaultTestAnnotations; +import software.xdev.spring.data.eclipse.store.integration.repositories.id.CustomerWithIdInt; +import software.xdev.spring.data.eclipse.store.integration.repositories.id.CustomerWithIdIntRepository; +import software.xdev.spring.data.eclipse.store.integration.repositories.id.CustomerWithIdInteger; +import software.xdev.spring.data.eclipse.store.integration.repositories.id.CustomerWithIdIntegerNoAutoGenerate; +import software.xdev.spring.data.eclipse.store.integration.repositories.id.CustomerWithIdIntegerNoAutoGenerateRepository; +import software.xdev.spring.data.eclipse.store.integration.repositories.id.CustomerWithIdIntegerRepository; +import software.xdev.spring.data.eclipse.store.integration.repositories.id.CustomerWithIdLong; +import software.xdev.spring.data.eclipse.store.integration.repositories.id.CustomerWithIdLongRepository; +import software.xdev.spring.data.eclipse.store.integration.repositories.id.CustomerWithIdString; +import software.xdev.spring.data.eclipse.store.integration.repositories.id.CustomerWithIdStringRepository; +import software.xdev.spring.data.eclipse.store.integration.repositories.id.CustomerWithPurchase; +import software.xdev.spring.data.eclipse.store.integration.repositories.id.CustomerWithPurchaseRepository; +import software.xdev.spring.data.eclipse.store.integration.repositories.id.Purchase; +import software.xdev.spring.data.eclipse.store.repository.EclipseStoreStorage; + + +@SuppressWarnings("OptionalGetWithoutIsPresent") +@DefaultTestAnnotations +class IdTest +{ + @Inject + private EclipseStoreStorage storage; + + @Test + void testCreateSingleWithAutoIdInteger(@Autowired final CustomerWithIdIntegerRepository customerRepository) + { + final CustomerWithIdInteger customer1 = new CustomerWithIdInteger(TestData.FIRST_NAME, TestData.LAST_NAME); + customerRepository.save(customer1); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final Optional loadedCustomer = customerRepository.findById(0); + Assertions.assertTrue(loadedCustomer.isPresent()); + Assertions.assertEquals(customer1, loadedCustomer.get()); + } + ); + } + + @Test + void testCreateSingleWithAutoIdIntegerWorkingCopyIdSet( + @Autowired final CustomerWithIdIntegerRepository customerRepository) + { + final CustomerWithIdInteger customer1 = new CustomerWithIdInteger(TestData.FIRST_NAME, TestData.LAST_NAME); + Assertions.assertNull(customer1.getId()); + customerRepository.save(customer1); + Assertions.assertNotNull(customer1.getId()); + } + + @Test + void testCreateMultipleWithAutoIdInteger(@Autowired final CustomerWithIdIntegerRepository customerRepository) + { + final CustomerWithIdInteger customer1 = new CustomerWithIdInteger(TestData.FIRST_NAME, TestData.LAST_NAME); + customerRepository.save(customer1); + final CustomerWithIdInteger customer2 = + new CustomerWithIdInteger(TestData.FIRST_NAME_ALTERNATIVE, TestData.LAST_NAME_ALTERNATIVE); + customerRepository.save(customer2); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List loadedCustomers = + TestUtil.iterableToList(customerRepository.findAllById(List.of(0, 1))); + Assertions.assertEquals(2, loadedCustomers.size()); + Assertions.assertNotEquals(loadedCustomers.get(0), loadedCustomers.get(1)); + } + ); + } + + @Test + void testCreateMultipleWithAutoIdIntegerSingleFinds( + @Autowired final CustomerWithIdIntegerRepository customerRepository) + { + final CustomerWithIdInteger customer1 = new CustomerWithIdInteger(TestData.FIRST_NAME, TestData.LAST_NAME); + customerRepository.save(customer1); + final CustomerWithIdInteger customer2 = + new CustomerWithIdInteger(TestData.FIRST_NAME_ALTERNATIVE, TestData.LAST_NAME_ALTERNATIVE); + customerRepository.save(customer2); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final Optional loadedCustomer1 = customerRepository.findById(0); + Assertions.assertEquals(customer1, loadedCustomer1.get()); + final Optional loadedCustomer2 = customerRepository.findById(1); + Assertions.assertEquals(customer2, loadedCustomer2.get()); + } + ); + } + + @Test + void testCreateSingleWithAutoIdInt(@Autowired final CustomerWithIdIntRepository customerRepository) + { + final CustomerWithIdInt customer1 = new CustomerWithIdInt(TestData.FIRST_NAME, TestData.LAST_NAME); + customerRepository.save(customer1); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final Optional loadedCustomer = customerRepository.findById(0); + Assertions.assertTrue(loadedCustomer.isPresent()); + Assertions.assertEquals(customer1, loadedCustomer.get()); + } + ); + } + + @Test + void testCreateSingleWithAutoIdString(@Autowired final CustomerWithIdStringRepository customerRepository) + { + final CustomerWithIdString customer1 = new CustomerWithIdString(TestData.FIRST_NAME, TestData.LAST_NAME); + customerRepository.save(customer1); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final Optional loadedCustomer = customerRepository.findById("0"); + Assertions.assertTrue(loadedCustomer.isPresent()); + Assertions.assertEquals(customer1, loadedCustomer.get()); + } + ); + } + + @Test + void testCreateMultipleWithAutoIdString(@Autowired final CustomerWithIdStringRepository customerRepository) + { + final CustomerWithIdString customer1 = new CustomerWithIdString(TestData.FIRST_NAME, TestData.LAST_NAME); + customerRepository.save(customer1); + final CustomerWithIdString customer2 = + new CustomerWithIdString(TestData.FIRST_NAME_ALTERNATIVE, TestData.LAST_NAME_ALTERNATIVE); + customerRepository.save(customer2); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List loadedCustomers = + TestUtil.iterableToList(customerRepository.findAllById(List.of("0", "1"))); + Assertions.assertEquals(2, loadedCustomers.size()); + Assertions.assertNotEquals(loadedCustomers.get(0), loadedCustomers.get(1)); + } + ); + } + + @Test + void testCreateSingleWithAutoIdLong(@Autowired final CustomerWithIdLongRepository customerRepository) + { + final CustomerWithIdLong customer1 = new CustomerWithIdLong(TestData.FIRST_NAME, TestData.LAST_NAME); + customerRepository.save(customer1); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final Optional loadedCustomer = customerRepository.findById(0L); + Assertions.assertTrue(loadedCustomer.isPresent()); + Assertions.assertEquals(customer1, loadedCustomer.get()); + Assertions.assertEquals(0L, loadedCustomer.get().getId()); + } + ); + } + + @Test + void testCreateMultipleWithAutoIdLong(@Autowired final CustomerWithIdLongRepository customerRepository) + { + final CustomerWithIdLong customer1 = new CustomerWithIdLong(TestData.FIRST_NAME, TestData.LAST_NAME); + customerRepository.save(customer1); + final CustomerWithIdLong customer2 = + new CustomerWithIdLong(TestData.FIRST_NAME_ALTERNATIVE, TestData.LAST_NAME_ALTERNATIVE); + customerRepository.save(customer2); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List loadedCustomers = + TestUtil.iterableToList(customerRepository.findAllById(List.of(0L, 1L))); + Assertions.assertEquals(2, loadedCustomers.size()); + Assertions.assertNotEquals(loadedCustomers.get(0), loadedCustomers.get(1)); + final List idList = loadedCustomers.stream().map(c -> c.getId()).toList(); + Assertions.assertTrue(idList.contains(0L)); + Assertions.assertTrue(idList.contains(1L)); + } + ); + } + + @Test + void testCreateSingleWithNoAutoIdInteger( + @Autowired final CustomerWithIdIntegerNoAutoGenerateRepository customerRepository) + { + final CustomerWithIdIntegerNoAutoGenerate customer1 = + new CustomerWithIdIntegerNoAutoGenerate(0, TestData.FIRST_NAME, TestData.LAST_NAME); + customerRepository.save(customer1); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final Optional loadedCustomer = customerRepository.findById(0); + Assertions.assertTrue(loadedCustomer.isPresent()); + Assertions.assertEquals(customer1, loadedCustomer.get()); + } + ); + } + + @Test + void testCreateMultipleWithNoAutoIdInteger( + @Autowired final CustomerWithIdIntegerNoAutoGenerateRepository customerRepository) + { + final CustomerWithIdIntegerNoAutoGenerate customer1 = + new CustomerWithIdIntegerNoAutoGenerate(0, TestData.FIRST_NAME, TestData.LAST_NAME); + customerRepository.save(customer1); + final CustomerWithIdIntegerNoAutoGenerate customer2 = + new CustomerWithIdIntegerNoAutoGenerate(1, TestData.FIRST_NAME_ALTERNATIVE, + TestData.LAST_NAME_ALTERNATIVE); + customerRepository.save(customer2); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List loadedCustomers = + TestUtil.iterableToList(customerRepository.findAllById(List.of(0, 1))); + Assertions.assertEquals(2, loadedCustomers.size()); + Assertions.assertNotEquals(loadedCustomers.get(0), loadedCustomers.get(1)); + } + ); + } + + @Test + void testSaveSingleWithAutoIdInteger( + @Autowired final CustomerWithIdIntegerRepository customerRepository) + { + final CustomerWithIdInteger customer1 = + new CustomerWithIdInteger(); + customerRepository.save(customer1); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List loadedCustomer = + TestUtil.iterableToList(customerRepository.findAll()); + Assertions.assertEquals(1, loadedCustomer.size()); + Assertions.assertEquals(0, loadedCustomer.get(0).getId()); + Assertions.assertEquals(customer1, loadedCustomer.get(0)); + } + ); + } + + @Test + void testSaveSingleWithNoAutoIdInteger( + @Autowired final CustomerWithIdIntegerNoAutoGenerateRepository customerRepository) + { + final CustomerWithIdIntegerNoAutoGenerate customer1 = + new CustomerWithIdIntegerNoAutoGenerate(); + customerRepository.save(customer1); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List loadedCustomer = + TestUtil.iterableToList(customerRepository.findAll()); + Assertions.assertEquals(1, loadedCustomer.size()); + Assertions.assertNull(loadedCustomer.get(0).getId()); + Assertions.assertEquals(customer1, loadedCustomer.get(0)); + } + ); + } + + @Test + void testAutoIdWithSubnodeWithId( + @Autowired final CustomerWithPurchaseRepository customerRepository) + { + final String purchaseName = "bag"; + final CustomerWithPurchase customer1 = + new CustomerWithPurchase(); + customer1.addPurchase(new Purchase(purchaseName)); + customerRepository.save(customer1); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List loadedCustomer = + TestUtil.iterableToList(customerRepository.findAll()); + Assertions.assertEquals(1, loadedCustomer.get(0).getPurchases().size()); + Assertions.assertEquals(purchaseName, loadedCustomer.get(0).getPurchases().get(0).getProductName()); + Assertions.assertEquals(0, loadedCustomer.get(0).getPurchases().get(0).getId()); + } + ); + } + + @Test + void testAutoIdWithTwoSubnodeWithId( + @Autowired final CustomerWithPurchaseRepository customerRepository) + { + final String purchaseName = "bag"; + final CustomerWithPurchase customer1 = + new CustomerWithPurchase(); + customer1.addPurchase(new Purchase(purchaseName)); + customer1.addPurchase(new Purchase(purchaseName)); + customerRepository.save(customer1); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List loadedCustomer = + TestUtil.iterableToList(customerRepository.findAll()); + Assertions.assertEquals(2, loadedCustomer.get(0).getPurchases().size()); + Assertions.assertEquals(0, loadedCustomer.get(0).getPurchases().get(0).getId()); + Assertions.assertEquals(1, loadedCustomer.get(0).getPurchases().get(1).getId()); + } + ); + } + + @Test + void testAutoIdWithTwoSameSubnodesWithSameIdDifferentNod( + @Autowired final CustomerWithPurchaseRepository customerRepository) + { + final Purchase purchase = new Purchase("bag"); + final CustomerWithPurchase customer1 = new CustomerWithPurchase(TestData.FIRST_NAME, TestData.LAST_NAME); + customer1.addPurchase(purchase); + customerRepository.save(customer1); + final CustomerWithPurchase customer2 = + new CustomerWithPurchase(TestData.FIRST_NAME_ALTERNATIVE, TestData.LAST_NAME_ALTERNATIVE); + customer2.addPurchase(purchase); + customerRepository.save(customer2); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List loadedCustomer = + TestUtil.iterableToList(customerRepository.findAll()); + + final CustomerWithPurchase loadedCustomer1 = + CustomerWithPurchase.getCustomerWithLastName(loadedCustomer, TestData.LAST_NAME); + Assertions.assertEquals(1, loadedCustomer1.getPurchases().size()); + Assertions.assertEquals(0, loadedCustomer1.getPurchases().get(0).getId()); + + TestUtil.iterableToList(customerRepository.findAll()); + final CustomerWithPurchase loadedCustomer2 = + CustomerWithPurchase.getCustomerWithLastName(loadedCustomer, TestData.LAST_NAME_ALTERNATIVE); + Assertions.assertEquals(1, loadedCustomer2.getPurchases().size()); + Assertions.assertEquals(0, loadedCustomer2.getPurchases().get(0).getId()); + } + ); + } + + @Test + void testAutoIdWithTwoSameSubnodesWithSameIdSameNode( + @Autowired final CustomerWithPurchaseRepository customerRepository) + { + final Purchase purchase = new Purchase("bag"); + final CustomerWithPurchase customer1 = new CustomerWithPurchase(TestData.FIRST_NAME, TestData.LAST_NAME); + customer1.addPurchase(purchase); + customer1.addPurchase(purchase); + customerRepository.save(customer1); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List loadedCustomer = + TestUtil.iterableToList(customerRepository.findAll()); + + Assertions.assertEquals(2, loadedCustomer.get(0).getPurchases().size()); + Assertions.assertEquals(0, loadedCustomer.get(0).getPurchases().get(0).getId()); + Assertions.assertEquals(0, loadedCustomer.get(0).getPurchases().get(1).getId()); + } + ); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/InheritanceTest.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/InheritanceTest.java new file mode 100644 index 00000000..d2077998 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/InheritanceTest.java @@ -0,0 +1,137 @@ +/* + * Copyright © 2023 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.integration.tests; + +import java.util.List; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +import jakarta.inject.Inject; +import software.xdev.spring.data.eclipse.store.helper.TestData; +import software.xdev.spring.data.eclipse.store.helper.TestUtil; +import software.xdev.spring.data.eclipse.store.integration.DefaultTestAnnotations; +import software.xdev.spring.data.eclipse.store.integration.repositories.ChildCustomer; +import software.xdev.spring.data.eclipse.store.integration.repositories.ChildCustomerRepository; +import software.xdev.spring.data.eclipse.store.integration.repositories.ParentCustomer; +import software.xdev.spring.data.eclipse.store.integration.repositories.ParentCustomerRepository; +import software.xdev.spring.data.eclipse.store.integration.repositories.SubCustomer; +import software.xdev.spring.data.eclipse.store.integration.repositories.SubCustomerRepository; +import software.xdev.spring.data.eclipse.store.repository.EclipseStoreStorage; + + +@DefaultTestAnnotations +class InheritanceTest +{ + @Inject + private ParentCustomerRepository parentCustomerRepository; + @Inject + private ChildCustomerRepository childCustomerRepository; + @Inject + private SubCustomerRepository subCustomerRepository; + @Inject + private EclipseStoreStorage storage; + + @Test + void testSaveChildFindParent() + { + final ChildCustomer customer1 = + new ChildCustomer(TestData.FIRST_NAME, TestData.FIRST_NAME_ALTERNATIVE, TestData.LAST_NAME); + this.childCustomerRepository.save(customer1); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List parentCustomers = + TestUtil.iterableToList(this.parentCustomerRepository.findAll()); + Assertions.assertEquals(1, parentCustomers.size()); + Assertions.assertEquals(parentCustomers.get(0).getFirstName(), TestData.FIRST_NAME); + + final List childCustomers = + TestUtil.iterableToList(this.childCustomerRepository.findAll()); + Assertions.assertEquals(1, childCustomers.size()); + Assertions.assertEquals(childCustomers.get(0).getFirstName(), TestData.FIRST_NAME); + } + ); + } + + @Test + void testRemoveChildFindParent() + { + final ChildCustomer customer1 = + new ChildCustomer(TestData.FIRST_NAME, TestData.FIRST_NAME_ALTERNATIVE, TestData.LAST_NAME); + this.childCustomerRepository.save(customer1); + this.childCustomerRepository.delete(customer1); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List parentCustomers = + TestUtil.iterableToList(this.parentCustomerRepository.findAll()); + Assertions.assertTrue(parentCustomers.isEmpty()); + + final List childCustomers = + TestUtil.iterableToList(this.childCustomerRepository.findAll()); + Assertions.assertTrue(childCustomers.isEmpty()); + } + ); + } + + @Test + void testChangeChildFindParent() + { + // Save customer + final ChildCustomer customer1 = + new ChildCustomer(TestData.FIRST_NAME, TestData.FIRST_NAME_ALTERNATIVE, TestData.LAST_NAME); + this.childCustomerRepository.save(customer1); + // Change customer + final ChildCustomer foundCustomer = + TestUtil.iterableToList(this.childCustomerRepository.findAll()).stream().findFirst().get(); + foundCustomer.setFirstName(TestData.FIRST_NAME_ALTERNATIVE); + this.childCustomerRepository.save(foundCustomer); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List parentCustomers = + TestUtil.iterableToList(this.parentCustomerRepository.findAll()); + Assertions.assertEquals(1, parentCustomers.size()); + Assertions.assertEquals(parentCustomers.get(0).getFirstName(), TestData.FIRST_NAME_ALTERNATIVE); + + final List childCustomers = + TestUtil.iterableToList(this.childCustomerRepository.findAll()); + Assertions.assertEquals(1, childCustomers.size()); + Assertions.assertEquals(childCustomers.get(0).getFirstName(), TestData.FIRST_NAME_ALTERNATIVE); + } + ); + } + + @Test + void testRecursiveFindByFirstNameOneResult() + { + final SubCustomer customer1 = new SubCustomer(TestData.FIRST_NAME, TestData.LAST_NAME); + this.subCustomerRepository.save(customer1); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final SubCustomer foundCustomer = this.subCustomerRepository.findByFirstName(TestData.FIRST_NAME); + Assertions.assertNotNull(foundCustomer); + Assertions.assertEquals(customer1, foundCustomer); + } + ); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/JpaCompatibilityTest.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/JpaCompatibilityTest.java new file mode 100644 index 00000000..0907a17c --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/JpaCompatibilityTest.java @@ -0,0 +1,92 @@ +/* + * Copyright © 2023 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.integration.tests; + +import java.util.List; +import java.util.Optional; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +import jakarta.inject.Inject; +import software.xdev.spring.data.eclipse.store.helper.TestData; +import software.xdev.spring.data.eclipse.store.helper.TestUtil; +import software.xdev.spring.data.eclipse.store.integration.DefaultTestAnnotations; +import software.xdev.spring.data.eclipse.store.integration.repositories.CustomerRepositoryWithQuery; +import software.xdev.spring.data.eclipse.store.integration.repositories.CustomerWithQuery; +import software.xdev.spring.data.eclipse.store.repository.EclipseStoreStorage; + + +@DefaultTestAnnotations +class JpaCompatibilityTest +{ + @Inject + private CustomerRepositoryWithQuery customerRepository; + + @Inject + private EclipseStoreStorage storage; + + @Test + void testUseQueryAnnotationFindAll() + { + final CustomerWithQuery customer1 = new CustomerWithQuery(TestData.FIRST_NAME, TestData.LAST_NAME); + this.customerRepository.save(customer1); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List customers = TestUtil.iterableToList(this.customerRepository.findAll()); + Assertions.assertEquals(1, customers.size()); + Assertions.assertEquals(customer1, customers.get(0)); + Assertions.assertNotSame(customer1, customers.get(0)); + } + ); + } + + @Test + void testUseQueryAnnotationFindByFirstName() + { + final CustomerWithQuery customer1 = new CustomerWithQuery(TestData.FIRST_NAME, TestData.LAST_NAME); + this.customerRepository.save(customer1); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final Optional foundCustomer = this.customerRepository.findByFirstName(TestData.FIRST_NAME); + Assertions.assertTrue(foundCustomer.isPresent()); + Assertions.assertEquals(customer1, foundCustomer.get()); + Assertions.assertNotSame(customer1, foundCustomer.get()); + } + ); + } + + @Test + void testUseQueryAnnotationFindAllByLastName() + { + final CustomerWithQuery customer1 = new CustomerWithQuery(TestData.FIRST_NAME, TestData.LAST_NAME); + this.customerRepository.save(customer1); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List customers = TestUtil.iterableToList(this.customerRepository.findAllByLastName(TestData.LAST_NAME)); + Assertions.assertEquals(1, customers.size()); + Assertions.assertEquals(customer1, customers.get(0)); + Assertions.assertNotSame(customer1, customers.get(0)); + } + ); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/QueryTest.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/QueryTest.java new file mode 100644 index 00000000..6a6a90fc --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/QueryTest.java @@ -0,0 +1,381 @@ +/* + * Copyright © 2023 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.integration.tests; + +import java.util.List; +import java.util.Optional; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.data.domain.Sort; + +import jakarta.inject.Inject; +import software.xdev.spring.data.eclipse.store.helper.TestData; +import software.xdev.spring.data.eclipse.store.helper.TestUtil; +import software.xdev.spring.data.eclipse.store.integration.DefaultTestAnnotations; +import software.xdev.spring.data.eclipse.store.integration.repositories.Child; +import software.xdev.spring.data.eclipse.store.integration.repositories.Customer; +import software.xdev.spring.data.eclipse.store.integration.repositories.CustomerRepository; +import software.xdev.spring.data.eclipse.store.integration.repositories.CustomerWithChild; +import software.xdev.spring.data.eclipse.store.integration.repositories.CustomerWithChildRepository; +import software.xdev.spring.data.eclipse.store.repository.EclipseStoreStorage; + + +@DefaultTestAnnotations +class QueryTest +{ + @Inject + private CustomerRepository customerRepository; + @Inject + private CustomerWithChildRepository customerWithChildRepository; + + @Inject + private EclipseStoreStorage storage; + + @Test + void testBasicFindAllByLastNameTwoResults() + { + final Customer customer1 = new Customer(TestData.FIRST_NAME, TestData.LAST_NAME); + this.customerRepository.save(customer1); + final Customer customer2 = new Customer(TestData.FIRST_NAME_ALTERNATIVE, TestData.LAST_NAME); + this.customerRepository.save(customer2); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List customers = + TestUtil.iterableToList(this.customerRepository.findAllByLastName(TestData.LAST_NAME)); + Assertions.assertEquals(2, customers.size()); + Assertions.assertEquals(customer1, Customer.getCustomerWithFirstName(customers, TestData.FIRST_NAME)); + Assertions.assertEquals( + customer2, + Customer.getCustomerWithFirstName(customers, TestData.FIRST_NAME_ALTERNATIVE)); + } + ); + } + + @Test + void testBasicFindAllByLastNameOneResult() + { + final Customer customer1 = new Customer(TestData.FIRST_NAME, TestData.LAST_NAME); + this.customerRepository.save(customer1); + final Customer customer2 = new Customer(TestData.FIRST_NAME_ALTERNATIVE, TestData.LAST_NAME_ALTERNATIVE); + this.customerRepository.save(customer2); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List customers = + TestUtil.iterableToList(this.customerRepository.findAllByLastName(TestData.LAST_NAME_ALTERNATIVE)); + Assertions.assertEquals(1, customers.size()); + Assertions.assertEquals(customer2, customers.get(0)); + } + ); + } + + @Test + void testBasicFindByFirstNameOneResult() + { + final Customer customer1 = new Customer(TestData.FIRST_NAME, TestData.LAST_NAME); + this.customerRepository.save(customer1); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final Optional foundCustomer = this.customerRepository.findByFirstName(TestData.FIRST_NAME); + Assertions.assertTrue(foundCustomer.isPresent()); + Assertions.assertEquals(TestData.FIRST_NAME, foundCustomer.get().getFirstName()); + } + ); + } + + @Test + void testPageableFindAllTwoPages() + { + final Customer customer1 = new Customer(TestData.FIRST_NAME, TestData.LAST_NAME); + this.customerRepository.save(customer1); + final Customer customer2 = new Customer(TestData.FIRST_NAME_ALTERNATIVE, TestData.LAST_NAME_ALTERNATIVE); + this.customerRepository.save(customer2); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final Pageable pageable = PageRequest.of(0, 1); + final List customersPage1 = TestUtil.iterableToList(this.customerRepository.findAll(pageable)); + Assertions.assertEquals(1, customersPage1.size()); + + final List customersPage2 = TestUtil.iterableToList(this.customerRepository.findAll(pageable.next())); + Assertions.assertEquals(1, customersPage2.size()); + + Assertions.assertNotEquals(customersPage1.get(0), customersPage2.get(0)); + } + ); + } + + @Test + void testPageableFindAllUnpaged() + { + final Customer customer1 = new Customer(TestData.FIRST_NAME, TestData.LAST_NAME); + this.customerRepository.save(customer1); + final Customer customer2 = new Customer(TestData.FIRST_NAME_ALTERNATIVE, TestData.LAST_NAME_ALTERNATIVE); + this.customerRepository.save(customer2); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final Pageable pageable = Pageable.unpaged(); + final List customersPage = TestUtil.iterableToList(this.customerRepository.findAll(pageable)); + Assertions.assertEquals(2, customersPage.size()); + Assertions.assertNotEquals(customersPage.get(0), customersPage.get(1)); + } + ); + } + + @Test + void testPageableFindAllOnePage() + { + final Customer customer1 = new Customer(TestData.FIRST_NAME, TestData.LAST_NAME); + this.customerRepository.save(customer1); + final Customer customer2 = new Customer(TestData.FIRST_NAME_ALTERNATIVE, TestData.LAST_NAME_ALTERNATIVE); + this.customerRepository.save(customer2); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final Pageable pageable = PageRequest.of(0, 2); + final List customersPage1 = TestUtil.iterableToList(this.customerRepository.findAll(pageable)); + Assertions.assertEquals(2, customersPage1.size()); + Assertions.assertEquals( + customer1, + Customer.getCustomerWithFirstName(customersPage1, TestData.FIRST_NAME)); + Assertions.assertEquals( + customer2, + Customer.getCustomerWithFirstName(customersPage1, TestData.FIRST_NAME_ALTERNATIVE)); + } + ); + } + + @Test + void testPageableFindByLastName() + { + final Customer customer1 = new Customer(TestData.FIRST_NAME, TestData.LAST_NAME); + this.customerRepository.save(customer1); + final Customer customer2 = new Customer(TestData.FIRST_NAME_ALTERNATIVE, TestData.LAST_NAME_ALTERNATIVE); + this.customerRepository.save(customer2); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final Pageable pageable = PageRequest.of(0, 10); + final List customersPage = + TestUtil.iterableToList(this.customerRepository.findAllByLastName(TestData.LAST_NAME, pageable)); + Assertions.assertEquals(1, customersPage.size()); + Assertions.assertEquals(customer1, customersPage.get(0)); + } + ); + } + + @Test + void testPageableFindByFirstNameWithList() + { + final Customer customer1 = new Customer(TestData.FIRST_NAME, TestData.LAST_NAME); + this.customerRepository.save(customer1); + final Customer customer2 = new Customer(TestData.FIRST_NAME_ALTERNATIVE, TestData.LAST_NAME_ALTERNATIVE); + this.customerRepository.save(customer2); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final Pageable pageable = PageRequest.of(0, 10); + final List customersPage = + TestUtil.iterableToList(this.customerRepository.findAllByFirstName(TestData.FIRST_NAME, pageable)); + Assertions.assertEquals(1, customersPage.size()); + Assertions.assertEquals(customer1, customersPage.get(0)); + } + ); + } + + @Test + void testSortFindByLastNameDefault() + { + final Customer customer1 = new Customer("B", TestData.LAST_NAME); + this.customerRepository.save(customer1); + final Customer customer2 = new Customer("A", TestData.LAST_NAME); + this.customerRepository.save(customer2); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final Sort sort = Sort.by("firstName"); + final List customersPage = + TestUtil.iterableToList(this.customerRepository.findAllByLastName(TestData.LAST_NAME, sort)); + Assertions.assertEquals(2, customersPage.size()); + Assertions.assertEquals(customer2, customersPage.get(0)); + Assertions.assertEquals(customer1, customersPage.get(1)); + } + ); + } + + @Test + void testSortFindByFirstNameAscending() + { + final Customer customer1 = new Customer("B", TestData.LAST_NAME); + this.customerRepository.save(customer1); + final Customer customer2 = new Customer("A", TestData.LAST_NAME); + this.customerRepository.save(customer2); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final Sort sort = Sort.by("firstName").ascending(); + final List customersPage = + TestUtil.iterableToList(this.customerRepository.findAllByLastName(TestData.LAST_NAME, sort)); + Assertions.assertEquals(2, customersPage.size()); + Assertions.assertEquals(customer2, customersPage.get(0)); + Assertions.assertEquals(customer1, customersPage.get(1)); + } + ); + } + + @Test + void testSortFindByFirstNameAscendingVariant() + { + final Customer customer1 = new Customer(TestData.FIRST_NAME, "B"); + this.customerRepository.save(customer1); + final Customer customer2 = new Customer(TestData.FIRST_NAME, "A"); + this.customerRepository.save(customer2); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final Sort sort = Sort.by(Sort.Direction.ASC, "lastName"); + final List customersPage = + TestUtil.iterableToList(this.customerRepository.findAll(sort)); + Assertions.assertEquals(2, customersPage.size()); + Assertions.assertEquals(customer2, customersPage.get(0)); + Assertions.assertEquals(customer1, customersPage.get(1)); + } + ); + } + + @Test + void testFindByOrderByLastNameAsc() + { + final Customer customer1 = new Customer(TestData.FIRST_NAME, "B"); + this.customerRepository.save(customer1); + final Customer customer2 = new Customer(TestData.FIRST_NAME, "A"); + this.customerRepository.save(customer2); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List customersPage = + TestUtil.iterableToList(this.customerRepository.findByOrderByLastNameAsc()); + Assertions.assertEquals(2, customersPage.size()); + Assertions.assertEquals(customer2, customersPage.get(0)); + Assertions.assertEquals(customer1, customersPage.get(1)); + } + ); + } + + @Test + void testSortFindByLastNameDescending() + { + final Customer customer1 = new Customer("B", TestData.LAST_NAME); + this.customerRepository.save(customer1); + final Customer customer2 = new Customer("A", TestData.LAST_NAME); + this.customerRepository.save(customer2); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final Sort sort = Sort.by("firstName").descending(); + final List customersPage = + TestUtil.iterableToList(this.customerRepository.findAllByLastName(TestData.LAST_NAME, sort)); + Assertions.assertEquals(2, customersPage.size()); + Assertions.assertEquals(customer1, customersPage.get(0)); + Assertions.assertEquals(customer2, customersPage.get(1)); + } + ); + } + + @Test + void testFindByChildExistingChild() + { + final Child child = new Child(TestData.FIRST_NAME_ALTERNATIVE, TestData.LAST_NAME_ALTERNATIVE); + final CustomerWithChild customer = new CustomerWithChild(TestData.FIRST_NAME, TestData.LAST_NAME, child); + this.customerWithChildRepository.save(customer); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final Optional foundCustomer = this.customerWithChildRepository.findByChild(child); + Assertions.assertTrue(foundCustomer.isPresent()); + } + ); + } + + @Test + void testFindByChildNewChild() + { + final Child child = new Child(TestData.FIRST_NAME_ALTERNATIVE, TestData.LAST_NAME_ALTERNATIVE); + final CustomerWithChild customer = new CustomerWithChild(TestData.FIRST_NAME, TestData.LAST_NAME, child); + this.customerWithChildRepository.save(customer); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final Child queryChild = new Child(TestData.FIRST_NAME_ALTERNATIVE, TestData.LAST_NAME_ALTERNATIVE); + final Optional foundCustomer = + this.customerWithChildRepository.findByChild(queryChild); + Assertions.assertTrue(foundCustomer.isPresent()); + } + ); + } + + @Test + void testFindByChildWhenNullNotExists() + { + final Child child = new Child(TestData.FIRST_NAME_ALTERNATIVE, TestData.LAST_NAME_ALTERNATIVE); + final CustomerWithChild customer = new CustomerWithChild(TestData.FIRST_NAME, TestData.LAST_NAME, child); + this.customerWithChildRepository.save(customer); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final Optional foundCustomer = this.customerWithChildRepository.findByChild(null); + Assertions.assertTrue(foundCustomer.isEmpty()); + } + ); + } + + @Test + void testFindByChildWhenNullExists() + { + final CustomerWithChild customer = new CustomerWithChild(TestData.FIRST_NAME, TestData.LAST_NAME, null); + this.customerWithChildRepository.save(customer); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final Optional foundCustomer = this.customerWithChildRepository.findByChild(null); + Assertions.assertTrue(foundCustomer.isPresent()); + } + ); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/RealLifeTests.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/RealLifeTests.java new file mode 100644 index 00000000..b0933ca8 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/RealLifeTests.java @@ -0,0 +1,338 @@ +/* + * Copyright © 2023 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.integration.tests; + +import static software.xdev.spring.data.eclipse.store.integration.repositories.real.life.example.Position.getPositionWithArticleWithName; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Optional; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +import jakarta.inject.Inject; +import software.xdev.spring.data.eclipse.store.helper.TestUtil; +import software.xdev.spring.data.eclipse.store.integration.DefaultTestAnnotations; +import software.xdev.spring.data.eclipse.store.integration.repositories.real.life.example.Article; +import software.xdev.spring.data.eclipse.store.integration.repositories.real.life.example.ArticleGroup; +import software.xdev.spring.data.eclipse.store.integration.repositories.real.life.example.Invoice; +import software.xdev.spring.data.eclipse.store.integration.repositories.real.life.example.InvoiceRepository; +import software.xdev.spring.data.eclipse.store.integration.repositories.real.life.example.Position; +import software.xdev.spring.data.eclipse.store.integration.repositories.real.life.example.PositionRepository; +import software.xdev.spring.data.eclipse.store.integration.repositories.real.life.example.Warehouse; +import software.xdev.spring.data.eclipse.store.repository.EclipseStoreStorage; + + +@SuppressWarnings("OptionalGetWithoutIsPresent") +@DefaultTestAnnotations +public class RealLifeTests +{ + public static final String STATIONERY = "Stationery"; + public static final String BUILDING_MATERIAL = "Building Material"; + public static final String PEN = "Pen"; + public static final String BRICK = "Brick"; + public static final int PEN_AMOUNT = 5; + public static final int BRICK_AMOUNT = 2; + public static final String WAREHOUSE_WEIDEN = "Weiden"; + @Inject + InvoiceRepository invoiceRepository; + @Inject + PositionRepository positionRepository; + @Inject + private EclipseStoreStorage storage; + + private Invoice buildDefaultModel() + { + final ArticleGroup stationery = new ArticleGroup(STATIONERY); + final ArticleGroup buildingMaterial = new ArticleGroup(BUILDING_MATERIAL); + final Warehouse weidenWarehouse = new Warehouse(); + weidenWarehouse.setName(WAREHOUSE_WEIDEN); + final Article pen = + new Article(PEN, stationery, weidenWarehouse); + final Article brick = + new Article(BRICK, buildingMaterial, weidenWarehouse); + final Position position1 = new Position(pen, PEN_AMOUNT); + final Position position2 = new Position(brick, BRICK_AMOUNT); + return new Invoice(new ArrayList<>(Arrays.asList(position1, position2))); + } + + private void buildDefaultModelAndSaveIt() + { + final Invoice invoice = this.buildDefaultModel(); + this.invoiceRepository.save(invoice); + } + + @Test + void testReplacePositionWithExistingArticle() + { + this.buildDefaultModelAndSaveIt(); + final Invoice invoice = TestUtil.iterableToList(this.invoiceRepository.findAll()).get(0); + final List positions = invoice.getPositions(); + final Optional positionOfBrick = getPositionWithArticleWithName(positions, BRICK); + final Optional positionOfPen = getPositionWithArticleWithName(positions, PEN); + positions.remove(positionOfBrick.get()); + positions.add(new Position(positionOfPen.get().getArticle(), 4)); + this.invoiceRepository.save(invoice); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final Invoice loadedInvoice = TestUtil.iterableToList(this.invoiceRepository.findAll()).get(0); + Assertions.assertEquals(2, loadedInvoice.getPositions().size()); + final Optional positionWithAmount4 = + loadedInvoice.getPositions().stream().filter(position -> position.getAmount() == 4).findFirst(); + Assertions.assertTrue(positionWithAmount4.isPresent()); + Assertions.assertSame( + loadedInvoice.getPositions().get(0).getArticle(), + loadedInvoice.getPositions().get(1).getArticle(), + "Both positions should point to the same article."); + } + ); + } + + @Test + void testReplacePositionWithNewArticleThroughInvoiceRepository() + { + final String shoeArticleName = "Shoe"; + this.buildDefaultModelAndSaveIt(); + final Invoice invoice = TestUtil.iterableToList(this.invoiceRepository.findAll()).get(0); + final List positions = invoice.getPositions(); + positions.remove(1); + + final ArticleGroup shoesGroup = new ArticleGroup("Shoes"); + final Article shoe = + new Article(shoeArticleName, shoesGroup, positions.get(0).getArticle().getWarehouses().get(0)); + positions.add(new Position(shoe, 4)); + this.invoiceRepository.save(invoice); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final Invoice loadedInvoice = TestUtil.iterableToList(this.invoiceRepository.findAll()).get(0); + final Optional + positionOfShoe = getPositionWithArticleWithName(loadedInvoice.getPositions(), shoeArticleName); + final Optional positionWithAmount4 = + loadedInvoice.getPositions().stream().filter(position -> position.getAmount() == 4).findFirst(); + Assertions.assertEquals(2, loadedInvoice.getPositions().size()); + Assertions.assertTrue(positionWithAmount4.isPresent()); + Assertions.assertTrue(positionOfShoe.isPresent()); + Assertions.assertEquals("Shoes", positionOfShoe.get().getArticle().getGroup().getName()); + Assertions.assertSame( + loadedInvoice.getPositions().get(0).getArticle().getWarehouses().get(0), + loadedInvoice.getPositions().get(1).getArticle().getWarehouses().get(0)); + } + ); + } + + @Test + void testAddNewArticleWithSameWarehouse() + { + final String shoeArticleName = "Shoe"; + this.buildDefaultModelAndSaveIt(); + final Invoice invoice = TestUtil.iterableToList(this.invoiceRepository.findAll()).get(0); + final List positions = invoice.getPositions(); + + final ArticleGroup shoesGroup = new ArticleGroup("Shoes"); + final Article shoe = + new Article(shoeArticleName, shoesGroup, positions.get(0).getArticle().getWarehouses().get(0)); + positions.add(new Position(shoe, 4)); + this.invoiceRepository.save(invoice); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final Invoice loadedInvoice = TestUtil.iterableToList(this.invoiceRepository.findAll()).get(0); + final Optional + positionOfShoe = getPositionWithArticleWithName(loadedInvoice.getPositions(), shoeArticleName); + final Optional positionWithAmount4 = + loadedInvoice.getPositions().stream().filter(position -> position.getAmount() == 4).findFirst(); + Assertions.assertEquals(3, loadedInvoice.getPositions().size()); + Assertions.assertTrue(positionWithAmount4.isPresent()); + Assertions.assertTrue(positionOfShoe.isPresent()); + Assertions.assertEquals("Shoes", positionOfShoe.get().getArticle().getGroup().getName()); + Assertions.assertSame( + loadedInvoice.getPositions().get(0).getArticle().getWarehouses().get(0), + loadedInvoice.getPositions().get(1).getArticle().getWarehouses().get(0)); + Assertions.assertSame( + loadedInvoice.getPositions().get(1).getArticle().getWarehouses().get(0), + loadedInvoice.getPositions().get(2).getArticle().getWarehouses().get(0)); + } + ); + } + + @Test + void testReplacePositionWithNewArticleThroughPositionRepository() + { + final String shoeArticleName = "Shoe"; + this.buildDefaultModelAndSaveIt(); + List positions = TestUtil.iterableToList(this.positionRepository.findAll()); + this.positionRepository.delete(positions.get(1)); + positions = TestUtil.iterableToList(this.positionRepository.findAll()); + + final ArticleGroup shoesGroup = new ArticleGroup("Shoes"); + final Article shoe = + new Article(shoeArticleName, shoesGroup, positions.get(0).getArticle().getWarehouses().get(0)); + positions.add(new Position(shoe, 4)); + this.positionRepository.saveAll(positions); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List loadedPositions = TestUtil.iterableToList(this.positionRepository.findAll()); + final Optional + positionOfShoe = getPositionWithArticleWithName(loadedPositions, shoeArticleName); + final Optional positionWithAmount4 = + loadedPositions.stream().filter(position -> position.getAmount() == 4).findFirst(); + Assertions.assertEquals(2, loadedPositions.size()); + Assertions.assertTrue(positionWithAmount4.isPresent()); + Assertions.assertTrue(positionOfShoe.isPresent()); + Assertions.assertEquals("Shoes", positionOfShoe.get().getArticle().getGroup().getName()); + Assertions.assertSame( + loadedPositions.get(0).getArticle().getWarehouses().get(0), + loadedPositions.get(1).getArticle().getWarehouses().get(0)); + } + ); + } + + @Test + void testReplacePositionWithNewArticleAndUseImmutableList() + { + final String shoeArticleName = "Shoe"; + this.buildDefaultModelAndSaveIt(); + + final List positions = TestUtil.iterableToList(this.positionRepository.findAll()); + final ArticleGroup shoesGroup = new ArticleGroup("Shoes"); + final Article shoe = + new Article(shoeArticleName, shoesGroup, List.of(positions.get(0).getArticle().getWarehouses().get(0))); + positions.add(new Position(shoe, 4)); + this.positionRepository.saveAll(positions); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List loadedPositions = TestUtil.iterableToList(this.positionRepository.findAll()); + Assertions.assertSame( + loadedPositions.get(0).getArticle().getWarehouses().get(0), + loadedPositions.get(1).getArticle().getWarehouses().get(0)); + } + ); + } + + @Test + void testSaveTwoObjectsWithSameReferenceThroughPositionRepository() + { + this.buildDefaultModelAndSaveIt(); + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List positions = TestUtil.iterableToList(this.positionRepository.findAll()); + Assertions.assertSame( + positions.get(0).getArticle().getWarehouses().get(0), + positions.get(1).getArticle().getWarehouses().get(0)); + } + ); + } + + @Test + void testSaveTwoObjectsWithSameReferenceThroughInvoiceRepository() + { + this.buildDefaultModelAndSaveIt(); + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List invoices = TestUtil.iterableToList(this.invoiceRepository.findAll()); + Assertions.assertSame( + invoices.get(0).getPositions().get(0).getArticle().getWarehouses().get(0), + invoices.get(0).getPositions().get(1).getArticle().getWarehouses().get(0)); + } + ); + } + + @Test + void testCreateTwoWorkingCopiesThroughTwoRepositories() + { + this.buildDefaultModelAndSaveIt(); + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List invoices = TestUtil.iterableToList(this.invoiceRepository.findAll()); + final List positions = TestUtil.iterableToList(this.positionRepository.findAll()); + Assertions.assertEquals(1, invoices.size()); + Assertions.assertEquals(2, positions.size()); + Assertions.assertNotSame( + invoices.get(0).getPositions().get(0), + positions.get(0)); + } + ); + } + + @Test + void testCreateTwoWorkingCopiesThroughOneRepository() + { + this.buildDefaultModelAndSaveIt(); + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List invoices1 = TestUtil.iterableToList(this.invoiceRepository.findAll()); + final List invoices2 = TestUtil.iterableToList(this.invoiceRepository.findAll()); + Assertions.assertNotSame( + invoices1.get(0), + invoices2.get(0)); + } + ); + } + + @Test + void testChangeSharedWarehouse() + { + final String newWarehouseName = "Amberg"; + this.buildDefaultModelAndSaveIt(); + final Position position1 = TestUtil.iterableToList(this.positionRepository.findAll()).get(0); + final Warehouse warehouse = position1.getArticle().getWarehouses().get(0); + warehouse.setName(newWarehouseName); + this.positionRepository.save(position1); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final Position position2 = TestUtil.iterableToList(this.positionRepository.findAll()).get(1); + Assertions.assertEquals(newWarehouseName, position2.getArticle().getWarehouses().get(0).getName()); + } + ); + } + + @Test + void testSaveSubRepositoryEntities() + { + this.buildDefaultModelAndSaveIt(); + final List positions = TestUtil.iterableToList(this.positionRepository.findAll()); + Assertions.assertEquals(2, positions.size()); + + final Invoice invoice = TestUtil.iterableToList(this.invoiceRepository.findAll()).get(0); + invoice.getPositions().clear(); + this.invoiceRepository.save(invoice); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List positions2 = TestUtil.iterableToList(this.positionRepository.findAll()); + Assertions.assertEquals(2, positions2.size()); + } + ); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/SimpleMultipleTest.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/SimpleMultipleTest.java new file mode 100644 index 00000000..14ab3896 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/SimpleMultipleTest.java @@ -0,0 +1,169 @@ +/* + * Copyright © 2023 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.integration.tests; + +import java.util.List; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +import jakarta.inject.Inject; +import software.xdev.spring.data.eclipse.store.helper.TestData; +import software.xdev.spring.data.eclipse.store.helper.TestUtil; +import software.xdev.spring.data.eclipse.store.integration.DefaultTestAnnotations; +import software.xdev.spring.data.eclipse.store.integration.repositories.Customer; +import software.xdev.spring.data.eclipse.store.integration.repositories.CustomerRepository; +import software.xdev.spring.data.eclipse.store.integration.repositories.Owner; +import software.xdev.spring.data.eclipse.store.integration.repositories.OwnerRepository; +import software.xdev.spring.data.eclipse.store.repository.EclipseStoreStorage; + + +@DefaultTestAnnotations +class SimpleMultipleTest +{ + @Inject + private CustomerRepository customerRepository; + @Inject + private OwnerRepository ownerRepository; + @Inject + private EclipseStoreStorage storage; + + @Test + void testBasicSaveAndFindAll() + { + final Customer + customer = new Customer(TestData.FIRST_NAME, TestData.LAST_NAME); + this.customerRepository.save(customer); + + final Owner + owner = new Owner(TestData.FIRST_NAME, TestData.LAST_NAME); + this.ownerRepository.save(owner); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List customers = TestUtil.iterableToList(this.customerRepository.findAll()); + Assertions.assertEquals(1, customers.size()); + Assertions.assertEquals(customer, customers.get(0)); + + final List owners = TestUtil.iterableToList(this.ownerRepository.findAll()); + Assertions.assertEquals(1, owners.size()); + Assertions.assertEquals(owner, owners.get(0)); + } + ); + } + + @Test + void testMultipleSaveAndFindAll() + { + final Customer + customer1 = new Customer(TestData.FIRST_NAME, TestData.LAST_NAME); + this.customerRepository.save(customer1); + final Customer + customer2 = new Customer(TestData.FIRST_NAME_ALTERNATIVE, TestData.LAST_NAME_ALTERNATIVE); + this.customerRepository.save(customer2); + + final Owner + owner1 = new Owner(TestData.FIRST_NAME, TestData.LAST_NAME); + this.ownerRepository.save(owner1); + final Owner + owner2 = new Owner(TestData.FIRST_NAME_ALTERNATIVE, TestData.LAST_NAME_ALTERNATIVE); + this.ownerRepository.save(owner2); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List customers = TestUtil.iterableToList(this.customerRepository.findAll()); + Assertions.assertEquals(2, customers.size()); + Assertions.assertEquals(customer1, Customer.getCustomerWithFirstName(customers, TestData.FIRST_NAME)); + Assertions.assertEquals( + customer2, + Customer.getCustomerWithFirstName(customers, TestData.FIRST_NAME_ALTERNATIVE)); + + final List owners = TestUtil.iterableToList(this.ownerRepository.findAll()); + Assertions.assertEquals(2, owners.size()); + Assertions.assertEquals(owner1, Owner.getOwnerWithFirstName(owners, TestData.FIRST_NAME)); + Assertions.assertEquals(owner2, Owner.getOwnerWithFirstName(owners, TestData.FIRST_NAME_ALTERNATIVE)); + } + ); + } + + @Test + void testBasicRemove() + { + final Customer + customer = new Customer(TestData.FIRST_NAME, TestData.LAST_NAME); + this.customerRepository.save(customer); + this.customerRepository.delete(customer); + + final Owner + owner = new Owner(TestData.FIRST_NAME, TestData.LAST_NAME); + this.ownerRepository.save(owner); + this.ownerRepository.delete(owner); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List customers = TestUtil.iterableToList(this.customerRepository.findAll()); + Assertions.assertTrue(customers.isEmpty()); + + final List owners = TestUtil.iterableToList(this.ownerRepository.findAll()); + Assertions.assertTrue(owners.isEmpty()); + } + ); + } + + @Test + void testBasicChange() + { + // Save default customer + final Customer + customer = new Customer(TestData.FIRST_NAME, TestData.LAST_NAME); + this.customerRepository.save(customer); + // Change customer + customer.setFirstName(TestData.FIRST_NAME_ALTERNATIVE); + customer.setLastName(TestData.LAST_NAME_ALTERNATIVE); + // Save changed customer + this.customerRepository.save(customer); + + // Save default customer + final Owner + owner = new Owner(TestData.FIRST_NAME, TestData.LAST_NAME); + this.ownerRepository.save(owner); + // Change customer + owner.setFirstName(TestData.FIRST_NAME_ALTERNATIVE); + owner.setLastName(TestData.LAST_NAME_ALTERNATIVE); + // Save changed customer + this.ownerRepository.save(owner); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + // Check saved customer + final List customers = TestUtil.iterableToList(this.customerRepository.findAll()); + Assertions.assertEquals(1, customers.size()); + Assertions.assertEquals(TestData.FIRST_NAME_ALTERNATIVE, customers.get(0).getFirstName()); + Assertions.assertEquals(TestData.LAST_NAME_ALTERNATIVE, customers.get(0).getLastName()); + + // Check saved customer + final List owners = TestUtil.iterableToList(this.ownerRepository.findAll()); + Assertions.assertEquals(1, owners.size()); + Assertions.assertEquals(TestData.FIRST_NAME_ALTERNATIVE, owners.get(0).getFirstName()); + Assertions.assertEquals(TestData.LAST_NAME_ALTERNATIVE, owners.get(0).getLastName()); + } + ); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/SimpleSingleTest.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/SimpleSingleTest.java new file mode 100644 index 00000000..b7ab90e1 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/SimpleSingleTest.java @@ -0,0 +1,202 @@ +/* + * Copyright © 2023 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.integration.tests; + +import java.util.List; +import java.util.Optional; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; + +import jakarta.inject.Inject; +import software.xdev.spring.data.eclipse.store.helper.TestData; +import software.xdev.spring.data.eclipse.store.helper.TestUtil; +import software.xdev.spring.data.eclipse.store.integration.DefaultTestAnnotations; +import software.xdev.spring.data.eclipse.store.integration.repositories.Customer; +import software.xdev.spring.data.eclipse.store.integration.repositories.CustomerNotCrud; +import software.xdev.spring.data.eclipse.store.integration.repositories.CustomerNotCrudRepository; +import software.xdev.spring.data.eclipse.store.integration.repositories.CustomerRepository; +import software.xdev.spring.data.eclipse.store.repository.EclipseStoreStorage; + + +@DefaultTestAnnotations +class SimpleSingleTest +{ + @Inject + private CustomerRepository repository; + + @Inject + private EclipseStoreStorage storage; + + @Test + void testNullFindAll() + { + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List customers = TestUtil.iterableToList(this.repository.findAll()); + Assertions.assertTrue(customers.isEmpty()); + } + ); + } + + @SuppressWarnings("DataFlowIssue") + @Test + void testNullSave() + { + Assertions.assertThrows(IllegalArgumentException.class, () -> this.repository.save(null)); + } + + @SuppressWarnings("DataFlowIssue") + @Test + void testNullSaveAll() + { + Assertions.assertThrows(IllegalArgumentException.class, () -> this.repository.saveAll(null)); + } + + @Test + void testBasicSaveAndFindAll() + { + final Customer customer = new Customer(TestData.FIRST_NAME, TestData.LAST_NAME); + this.repository.save(customer); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List customers = TestUtil.iterableToList(this.repository.findAll()); + Assertions.assertEquals(1, customers.size()); + Assertions.assertEquals(customer, customers.get(0)); + } + ); + } + + @Test + void testDoubleSaveAndFindAll() + { + final Customer customer = new Customer(TestData.FIRST_NAME, TestData.LAST_NAME); + this.repository.save(customer); + customer.setFirstName(TestData.FIRST_NAME_ALTERNATIVE); + this.repository.save(customer); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final Optional foundCustomer = + this.repository.findByFirstName(TestData.FIRST_NAME_ALTERNATIVE); + Assertions.assertTrue(foundCustomer.isPresent()); + } + ); + } + + @Test + void testBasicSaveAndFindAllWithNotCrudRepository(@Autowired final CustomerNotCrudRepository notCrudRepository) + { + final CustomerNotCrud customer = new CustomerNotCrud(TestData.FIRST_NAME, TestData.LAST_NAME); + notCrudRepository.save(customer); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List customers = TestUtil.iterableToList(notCrudRepository.findAll()); + Assertions.assertEquals(1, customers.size()); + Assertions.assertEquals(customer, customers.get(0)); + } + ); + } + + @Test + void testMultipleSaveAndFindAll() + { + final Customer customer1 = new Customer(TestData.FIRST_NAME, TestData.LAST_NAME); + this.repository.save(customer1); + final Customer customer2 = new Customer(TestData.FIRST_NAME_ALTERNATIVE, TestData.LAST_NAME_ALTERNATIVE); + this.repository.save(customer2); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List customers = TestUtil.iterableToList(this.repository.findAll()); + Assertions.assertEquals(2, customers.size()); + final Optional firstCustomer = + customers.stream().filter(customer -> customer.equals(customer1)).findFirst(); + Assertions.assertTrue(firstCustomer.isPresent()); + final Optional secondCustomer = + customers.stream().filter(customer -> customer.equals(customer2)).findFirst(); + Assertions.assertTrue(secondCustomer.isPresent()); + } + ); + } + + @Test + void testBasicRemove() + { + final Customer customer = new Customer(TestData.FIRST_NAME, TestData.LAST_NAME); + this.repository.save(customer); + this.repository.delete(customer); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List customers = TestUtil.iterableToList(this.repository.findAll()); + Assertions.assertTrue(customers.isEmpty()); + } + ); + } + + @Test + void testBasicChange() + { + // Save default customer + final Customer customer = new Customer(TestData.FIRST_NAME, TestData.LAST_NAME); + this.repository.save(customer); + // Change customer + customer.setFirstName(TestData.FIRST_NAME_ALTERNATIVE); + customer.setLastName(TestData.LAST_NAME_ALTERNATIVE); + // Save changed customer + this.repository.save(customer); + // Check saved customer + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List customers = TestUtil.iterableToList(this.repository.findAll()); + Assertions.assertEquals(1, customers.size()); + Assertions.assertEquals(TestData.FIRST_NAME_ALTERNATIVE, customers.get(0).getFirstName()); + Assertions.assertEquals(TestData.LAST_NAME_ALTERNATIVE, customers.get(0).getLastName()); + } + ); + } + + @Test + void testRestart() + { + TestUtil.restartDatastore(this.storage); + final List customers = TestUtil.iterableToList(this.repository.findAll()); + Assertions.assertTrue(customers.isEmpty()); + } + + @Test + void testSaveWithRestart() + { + final Customer customer = new Customer(TestData.FIRST_NAME, TestData.LAST_NAME); + this.repository.save(customer); + TestUtil.restartDatastore(this.storage); + // Automatically restarts if needed + final List customers = TestUtil.iterableToList(this.repository.findAll()); + Assertions.assertEquals(1, customers.size()); + Assertions.assertEquals(customer, customers.get(0)); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/StressTest.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/StressTest.java new file mode 100644 index 00000000..cb35d9bf --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/StressTest.java @@ -0,0 +1,81 @@ +/* + * Copyright © 2023 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.integration.tests; + +import java.util.List; +import java.util.stream.IntStream; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.ValueSource; + +import jakarta.inject.Inject; +import software.xdev.spring.data.eclipse.store.helper.TestUtil; +import software.xdev.spring.data.eclipse.store.integration.DefaultTestAnnotations; +import software.xdev.spring.data.eclipse.store.integration.repositories.Customer; +import software.xdev.spring.data.eclipse.store.integration.repositories.CustomerRepository; +import software.xdev.spring.data.eclipse.store.repository.EclipseStoreStorage; + + +@DefaultTestAnnotations +class StressTest +{ + @Inject + private CustomerRepository repository; + + @Inject + private EclipseStoreStorage storage; + + /** + * @param customerCount beyond 5_000 takes quite a long time. That's why 5_000 is the biggest number for single + * saving. + */ + @ParameterizedTest + @ValueSource(ints = {100, 1_000, 5_000}) + void testSaveSingleAndRestoreManyCustomers(final int customerCount) + { + IntStream.range(0, customerCount).forEach( + i -> this.repository.save(new Customer("Test" + i, "Test" + i)) + ); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List customers = TestUtil.iterableToList(this.repository.findAll()); + Assertions.assertEquals(customerCount, customers.size()); + } + ); + } + + @ParameterizedTest + @ValueSource(ints = {100, 1_000, 5_000, 10_000, 50_000, 100_000}) + void testSaveBulkAndRestoreManyCustomers(final int customerCount) + { + this.repository.saveAll( + IntStream.range(0, customerCount).mapToObj( + i -> new Customer("Test" + i, "Test" + i) + ).toList() + ); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List customers = TestUtil.iterableToList(this.repository.findAll()); + Assertions.assertEquals(customerCount, customers.size()); + } + ); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/WorkingCopyTests.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/WorkingCopyTests.java new file mode 100644 index 00000000..dc4c7802 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/WorkingCopyTests.java @@ -0,0 +1,277 @@ +/* + * Copyright © 2023 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.integration.tests; + +import java.util.List; +import java.util.Optional; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +import jakarta.inject.Inject; +import software.xdev.spring.data.eclipse.store.helper.TestData; +import software.xdev.spring.data.eclipse.store.helper.TestUtil; +import software.xdev.spring.data.eclipse.store.integration.DefaultTestAnnotations; +import software.xdev.spring.data.eclipse.store.integration.repositories.Customer; +import software.xdev.spring.data.eclipse.store.integration.repositories.CustomerRepository; +import software.xdev.spring.data.eclipse.store.integration.repositories.Node; +import software.xdev.spring.data.eclipse.store.integration.repositories.NodeRepository; +import software.xdev.spring.data.eclipse.store.repository.EclipseStoreStorage; + + +@SuppressWarnings("OptionalGetWithoutIsPresent") +@DefaultTestAnnotations +public class WorkingCopyTests +{ + public static final String CHILD_NAME_1 = "child1"; + public static final String PARENT_NAME_2 = "parent2"; + public static final String PARENT_NAME_1 = "parent1"; + @Inject + CustomerRepository customerRepository; + @Inject + NodeRepository nodeRepository; + @Inject + private EclipseStoreStorage storage; + + @Test + void testBasicChangeOnlyAfterSave() + { + // Save default customer + final Customer customer = new Customer(TestData.FIRST_NAME, TestData.LAST_NAME); + this.customerRepository.save(customer); + // Change In-Memory customer + customer.setFirstName(TestData.FIRST_NAME_ALTERNATIVE); + customer.setLastName(TestData.LAST_NAME_ALTERNATIVE); + + // Check saved customer + final List customers = TestUtil.iterableToList(this.customerRepository.findAll()); + Assertions.assertEquals(1, customers.size()); + Assertions.assertEquals(TestData.FIRST_NAME, customers.get(0).getFirstName()); + Assertions.assertEquals(TestData.LAST_NAME, customers.get(0).getLastName()); + + // Save changed customer + this.customerRepository.save(customer); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + // Check saved customer + final List customers2 = TestUtil.iterableToList(this.customerRepository.findAll()); + Assertions.assertEquals(1, customers2.size()); + Assertions.assertEquals(TestData.FIRST_NAME_ALTERNATIVE, customers2.get(0).getFirstName()); + Assertions.assertEquals(TestData.LAST_NAME_ALTERNATIVE, customers2.get(0).getLastName()); + } + ); + } + + @Test + void testBasicCopy() + { + final Customer customer = new Customer(TestData.FIRST_NAME, TestData.LAST_NAME); + this.customerRepository.save(customer); + final List customers = TestUtil.iterableToList(this.customerRepository.findAll()); + Assertions.assertNotSame(customer, customers.get(0)); + } + + @Test + void testBasicDoubleCopy() + { + final Customer customer = new Customer(TestData.FIRST_NAME, TestData.LAST_NAME); + this.customerRepository.save(customer); + final List customers1 = TestUtil.iterableToList(this.customerRepository.findAll()); + final List customers2 = TestUtil.iterableToList(this.customerRepository.findAll()); + Assertions.assertNotSame(customers1.get(0), customers2.get(0)); + } + + //@formatter:off + /** + * □-□ + * □-┘ + **/ + //@formatter:on + @Test + void testStoreGraphWithCircularRelation() + { + final String parent1Name = PARENT_NAME_1; + final String parent2Name = PARENT_NAME_2; + final Node childNode = new Node(CHILD_NAME_1); + final Node parentNode1 = new Node(parent1Name, List.of(childNode)); + final Node parentNode2 = new Node(parent2Name); + childNode.getChildren().add(parentNode2); + + this.nodeRepository.save(parentNode1); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List loadedNodes = TestUtil.iterableToList(this.nodeRepository.findAll()); + Assertions.assertEquals(3, loadedNodes.size()); + + final Optional loadedChildNode = + loadedNodes.stream().filter(node -> node.getName().equals(CHILD_NAME_1)).findFirst(); + Assertions.assertTrue(loadedChildNode.isPresent()); + final Optional loadedParentNode1 = + loadedNodes.stream().filter(node -> node.getName().equals(parent1Name)).findFirst(); + Assertions.assertTrue(loadedParentNode1.isPresent()); + final Optional loadedParentNode2 = + loadedNodes.stream().filter(node -> node.getName().equals(parent2Name)).findFirst(); + Assertions.assertTrue(loadedParentNode2.isPresent()); + + Assertions.assertSame(loadedParentNode1.get().getChildren().get(0), loadedChildNode.get()); + Assertions.assertSame(loadedChildNode.get().getChildren().get(0), loadedParentNode2.get()); + } + ); + } + + //@formatter:off + /** + * □-□ + * □-┘ + **/ + //@formatter:on + @Test + void testStoreGraphWithCircularRelationWithDoubleSave() + { + final Node childNode = new Node(CHILD_NAME_1); + final Node parentNode1 = new Node(PARENT_NAME_1, List.of(childNode)); + final Node parentNode2 = new Node(PARENT_NAME_2); + childNode.getChildren().add(parentNode2); + + this.nodeRepository.save(parentNode1); + this.nodeRepository.save(parentNode2); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List loadedNodes = TestUtil.iterableToList(this.nodeRepository.findAll()); + Assertions.assertEquals(3, loadedNodes.size()); + + final Node loadedChildNode = + loadedNodes.stream().filter(node -> node.getName().equals(CHILD_NAME_1)).findFirst().get(); + Assertions.assertEquals(CHILD_NAME_1, loadedChildNode.getName()); + final Node loadedParentNode1 = + loadedNodes.stream().filter(node -> node.getName().equals(PARENT_NAME_1)).findFirst().get(); + Assertions.assertEquals(PARENT_NAME_1, loadedParentNode1.getName()); + final Node loadedParentNode2 = + loadedNodes.stream().filter(node -> node.getName().equals(PARENT_NAME_2)).findFirst().get(); + Assertions.assertEquals(PARENT_NAME_2, loadedParentNode2.getName()); + + Assertions.assertSame(loadedParentNode1.getChildren().get(0), loadedChildNode); + Assertions.assertSame(loadedChildNode.getChildren().get(0), loadedParentNode2); + } + ); + } + + //@formatter:off + /** + * □-□ + * □-┘ + **/ + //@formatter:on + @Test + void testStoreGraphWithCircularRelationWithTrippleSave() + { + final Node childNode = new Node(CHILD_NAME_1); + final Node parentNode1 = new Node(PARENT_NAME_1, List.of(childNode)); + final Node parentNode2 = new Node(PARENT_NAME_2); + childNode.getChildren().add(parentNode2); + + this.nodeRepository.save(parentNode1); + this.nodeRepository.save(parentNode2); + this.nodeRepository.save(childNode); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List loadedNodes = TestUtil.iterableToList(this.nodeRepository.findAll()); + Assertions.assertEquals(3, loadedNodes.size()); + + final Node loadedChildNode = + loadedNodes.stream().filter(node -> node.getName().equals(CHILD_NAME_1)).findFirst().get(); + Assertions.assertEquals(CHILD_NAME_1, loadedChildNode.getName()); + final Node loadedParentNode1 = + loadedNodes.stream().filter(node -> node.getName().equals(PARENT_NAME_1)).findFirst().get(); + Assertions.assertEquals(PARENT_NAME_1, loadedParentNode1.getName()); + final Node loadedParentNode2 = + loadedNodes.stream().filter(node -> node.getName().equals(PARENT_NAME_2)).findFirst().get(); + Assertions.assertEquals(PARENT_NAME_2, loadedParentNode2.getName()); + + Assertions.assertSame(loadedParentNode1.getChildren().get(0), loadedChildNode); + Assertions.assertSame(loadedChildNode.getChildren().get(0), loadedParentNode2); + } + ); + } + + //@formatter:off + /** + * □-□ + * □-┘ + **/ + //@formatter:on + @Test + void testModifyGraph() + { + final String changedParentNode2Name = "changedParent2"; + final Node childNode = new Node(CHILD_NAME_1); + final Node parentNode1 = new Node(PARENT_NAME_1, List.of(childNode)); + final Node parentNode2 = new Node(PARENT_NAME_2); + childNode.getChildren().add(parentNode2); + this.nodeRepository.save(parentNode1); + this.nodeRepository.save(parentNode2); + final List loadedNodes1 = TestUtil.iterableToList(this.nodeRepository.findAll()); + Assertions.assertEquals(3, loadedNodes1.size()); + Node loadedChildNode = + loadedNodes1.stream().filter(node -> node.getName().equals(CHILD_NAME_1)).findFirst().get(); + final Node loadedParentNode2 = + loadedNodes1.stream().filter(node -> node.getName().equals(PARENT_NAME_2)).findFirst().get(); + // Change working copy + loadedParentNode2.setName(changedParentNode2Name); + Assertions.assertEquals(changedParentNode2Name, loadedChildNode.getChildren().get(0).getName()); + + // No change in stored data before saving + final List loadedNodes2 = TestUtil.iterableToList(this.nodeRepository.findAll()); + loadedChildNode = loadedNodes2.stream().filter(node -> node.getName().equals(CHILD_NAME_1)).findFirst().get(); + Assertions.assertEquals(PARENT_NAME_2, loadedChildNode.getChildren().get(0).getName()); + + // Change in stored data after saving + this.nodeRepository.saveAll(loadedNodes1); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List loadedNodes3 = TestUtil.iterableToList(this.nodeRepository.findAll()); + final Node loadedChildNode2 = + loadedNodes3.stream().filter(node -> node.getName().equals(CHILD_NAME_1)).findFirst().get(); + Assertions.assertEquals(changedParentNode2Name, loadedChildNode2.getChildren().get(0).getName()); + } + ); + } + + @Test + void testBasicFindByFirstNameOneResult() + { + final Customer customer1 = new Customer(TestData.FIRST_NAME, TestData.LAST_NAME); + this.customerRepository.save(customer1); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final Optional foundCustomer = this.customerRepository.findByFirstName(TestData.FIRST_NAME); + Assertions.assertNotSame(customer1, foundCustomer.get()); + } + ); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/EclipseStoreQueryCreatorAndOrTest.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/EclipseStoreQueryCreatorAndOrTest.java new file mode 100644 index 00000000..344496c4 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/EclipseStoreQueryCreatorAndOrTest.java @@ -0,0 +1,308 @@ +/* + * Copyright © 2023 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.repository.query; + +import java.lang.reflect.Method; +import java.util.Collection; +import java.util.List; +import java.util.stream.Stream; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; +import org.springframework.data.repository.Repository; + +import software.xdev.spring.data.eclipse.store.helper.TestData; + + +class EclipseStoreQueryCreatorAndOrTest +{ + static Stream generateDataWithCountOfFirstNameAndLastName() + { + return Stream.of( + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_EMPTY, 0), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_ONE, 1), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_TWO, 1), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_THREE, 1), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_DABC_ABCD, 0) + ); + } + + @ParameterizedTest + @MethodSource("generateDataWithCountOfFirstNameAndLastName") + void findByFirstNameAndLastName( + final Collection entities, + final int expectedCount) throws NoSuchMethodException + { + final Method method = + CustomerRepository.class.getMethod("findByFirstNameAndLastName", String.class, String.class); + final Collection foundCustomer = + QueryCreatorUtil.executeQuery( + entities, + QueryCreatorUtil.Customer.class, + method, + new Object[]{TestData.FIRST_NAME, TestData.LAST_NAME}); + Assertions.assertEquals(expectedCount, foundCustomer.size()); + } + + static Stream generateDataWithCountOfFirstNameOrLastName() + { + return Stream.of( + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_EMPTY, 0), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_ONE, 1), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_TWO, 2), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_THREE, 3), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_DABC_ABCD, 0) + ); + } + + @ParameterizedTest + @MethodSource("generateDataWithCountOfFirstNameOrLastName") + void findByFirstNameOrLastName( + final Collection entities, + final int expectedCount) throws NoSuchMethodException + { + final Method method = + CustomerRepository.class.getMethod("findByFirstNameOrLastName", String.class, String.class); + final Collection foundCustomer = + QueryCreatorUtil.executeQuery( + entities, + QueryCreatorUtil.Customer.class, + method, + new Object[]{TestData.FIRST_NAME, TestData.LAST_NAME_ALTERNATIVE}); + Assertions.assertEquals(expectedCount, foundCustomer.size()); + } + + static Stream generateDataWithCountOfId2AndFirstName() + { + return Stream.of( + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_EMPTY, 0), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_ONE, 0), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_TWO, 1), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_THREE, 1), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_DABC_ABCD, 0) + ); + } + + @ParameterizedTest + @MethodSource("generateDataWithCountOfId2AndFirstName") + void findByIdAndFirstName( + final Collection entities, + final int expectedCount) throws NoSuchMethodException + { + final Method method = CustomerRepository.class.getMethod("findByIdAndFirstName", int.class, String.class); + final Collection foundCustomer = + QueryCreatorUtil.executeQuery( + entities, + QueryCreatorUtil.Customer.class, + method, + new Object[]{2, TestData.FIRST_NAME_ALTERNATIVE}); + Assertions.assertEquals(expectedCount, foundCustomer.size()); + } + + static Stream generateDataWithCountOfIdAndFirstNameAndLastName() + { + return Stream.of( + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_EMPTY, 0), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_ONE, 0), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_TWO, 1), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_THREE, 1), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_DABC_ABCD, 0) + ); + } + + @ParameterizedTest + @MethodSource("generateDataWithCountOfIdAndFirstNameAndLastName") + void findByIdAndFirstNameAndLastName( + final Collection entities, + final int expectedCount) throws NoSuchMethodException + { + final Method method = CustomerRepository.class.getMethod( + "findByIdAndFirstNameAndLastName", + int.class, + String.class, + String.class); + final Collection foundCustomer = + QueryCreatorUtil.executeQuery( + entities, + QueryCreatorUtil.Customer.class, + method, + new Object[]{2, TestData.FIRST_NAME_ALTERNATIVE, TestData.LAST_NAME_ALTERNATIVE}); + Assertions.assertEquals(expectedCount, foundCustomer.size()); + } + + static Stream generateDataWithCountOfIdOrFirstNameOrLastName() + { + return Stream.of( + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_EMPTY, 0), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_ONE, 1), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_TWO, 2), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_THREE, 3), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_DABC_ABCD, 2) + ); + } + + @ParameterizedTest + @MethodSource("generateDataWithCountOfIdOrFirstNameOrLastName") + void findByIdOrFirstNameOrLastName( + final Collection entities, + final int expectedCount) throws NoSuchMethodException + { + final Method method = CustomerRepository.class.getMethod( + "findByIdOrFirstNameOrLastName", + int.class, + String.class, + String.class); + final Collection foundCustomer = + QueryCreatorUtil.executeQuery( + entities, + QueryCreatorUtil.Customer.class, + method, + new Object[]{1, "B", TestData.LAST_NAME_ALTERNATIVE}); + Assertions.assertEquals(expectedCount, foundCustomer.size()); + } + + static Stream generateDataWithCountOfIdAndFirstNameOrLastName() + { + return Stream.of( + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_EMPTY, 0), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_ONE, 0), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_TWO, 1), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_THREE, 2), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_DABC_ABCD, 1) + ); + } + + /** + * Should have the same Assertions as {@link #findByLastNameOrIdAndFirstName} + **/ + @ParameterizedTest + @MethodSource("generateDataWithCountOfIdAndFirstNameOrLastName") + void findByIdAndFirstNameOrLastName( + final Collection entities, + final int expectedCount) throws NoSuchMethodException + { + final Method method = CustomerRepository.class.getMethod( + "findByIdAndFirstNameOrLastName", + int.class, + String.class, + String.class); + final Collection foundCustomer = + QueryCreatorUtil.executeQuery( + entities, + QueryCreatorUtil.Customer.class, + method, + new Object[]{1, "D", TestData.LAST_NAME_ALTERNATIVE}); + Assertions.assertEquals(expectedCount, foundCustomer.size()); + } + + /** + * Should have the same Assertions as {@link #findByIdAndFirstNameOrLastName} + *

+ * TODO: This fails because {@code AND} is not prioritized higher then {@code OR}. + * Since this is a lot of work in the criteria tree, this is postponed. + *

+ */ + @ParameterizedTest + @MethodSource("generateDataWithCountOfIdAndFirstNameOrLastName") + @Disabled("This fails because AND is not prioritized higher then OR. Since this is a lot of work " + + "in the criteria tree, this is postponed.") + void findByLastNameOrIdAndFirstName( + final Collection entities, + final int expectedCount) throws NoSuchMethodException + { + final Method method = CustomerRepository.class.getMethod( + "findByLastNameOrIdAndFirstName", + String.class, + int.class, + String.class); + final Collection foundCustomer = + QueryCreatorUtil.executeQuery( + entities, + QueryCreatorUtil.Customer.class, + method, + new Object[]{1, "D", TestData.LAST_NAME_ALTERNATIVE}); + Assertions.assertEquals(expectedCount, foundCustomer.size()); + } + + static Stream generateDataWithCountOfIdOrFirstNameAndLastName() + { + return Stream.of( + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_EMPTY, 0), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_ONE, 1), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_TWO, 1), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_THREE, 2), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_DABC_ABCD, 1) + ); + } + + @ParameterizedTest + @MethodSource("generateDataWithCountOfIdOrFirstNameAndLastName") + void findByIdOrFirstNameAndLastName( + final Collection entities, + final int expectedCount) throws NoSuchMethodException + { + final Method method = CustomerRepository.class.getMethod( + "findByIdOrFirstNameAndLastName", + int.class, + String.class, + String.class); + final Collection foundCustomer = + QueryCreatorUtil.executeQuery( + entities, + QueryCreatorUtil.Customer.class, + method, + new Object[]{1, TestData.FIRST_NAME, TestData.LAST_NAME_ALTERNATIVE}); + Assertions.assertEquals(expectedCount, foundCustomer.size()); + } + + private interface CustomerRepository extends Repository + { + + List findByFirstNameAndLastName(final String firstName, String lastName); + + List findByFirstNameOrLastName(final String firstName, String lastName); + + List findByIdAndFirstName(final int id, final String firstName); + + List findByIdAndFirstNameAndLastName( + final int id, + final String firstName, + String lastName); + + List findByIdOrFirstNameOrLastName( + final int id, + final String firstName, + String lastName); + + List findByIdAndFirstNameOrLastName( + final int id, + final String firstName, + String lastName); + + List findByLastNameOrIdAndFirstName( + String lastName, + final int id, + final String firstName); + + List findByIdOrFirstNameAndLastName( + final int id, + final String firstName, + String lastName); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/EclipseStoreQueryCreatorBooleanTest.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/EclipseStoreQueryCreatorBooleanTest.java new file mode 100644 index 00000000..a3e4164e --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/EclipseStoreQueryCreatorBooleanTest.java @@ -0,0 +1,83 @@ +/* + * Copyright © 2023 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.repository.query; + +import java.lang.reflect.Method; +import java.util.Collection; +import java.util.List; +import java.util.stream.Stream; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; +import org.springframework.data.repository.Repository; + + +class EclipseStoreQueryCreatorBooleanTest +{ + + static Stream generateDataWithCountOfEnabled() + { + return Stream.of( + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_EMPTY, 0), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_ONE, 1), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_TWO, 1), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_THREE, 1), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_DABC_ABCD, 2) + ); + } + + @ParameterizedTest + @MethodSource("generateDataWithCountOfEnabled") + void findByEnabledTrue(final Collection entities, final int expectedCount) + throws NoSuchMethodException + { + final Method method = CustomerRepository.class.getMethod("findByEnabledTrue"); + final Collection foundCustomer = + QueryCreatorUtil.executeQuery(entities, QueryCreatorUtil.Customer.class, method, new Object[]{}); + Assertions.assertEquals(expectedCount, foundCustomer.size()); + } + + static Stream generateDataWithCountOfEnabledFalse() + { + return Stream.of( + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_EMPTY, 0), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_ONE, 0), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_TWO, 1), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_THREE, 2), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_DABC_ABCD, 2) + ); + } + + @ParameterizedTest + @MethodSource("generateDataWithCountOfEnabledFalse") + void findByEnabledFalse(final Collection entities, final int expectedCount) + throws NoSuchMethodException + { + final Method method = CustomerRepository.class.getMethod("findByEnabledFalse"); + final Collection foundCustomer = + QueryCreatorUtil.executeQuery(entities, QueryCreatorUtil.Customer.class, method, new Object[]{}); + Assertions.assertEquals(expectedCount, foundCustomer.size()); + } + + private interface CustomerRepository extends Repository + { + List findByEnabledTrue(); + + List findByEnabledFalse(); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/EclipseStoreQueryCreatorCollectionTest.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/EclipseStoreQueryCreatorCollectionTest.java new file mode 100644 index 00000000..107b90fc --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/EclipseStoreQueryCreatorCollectionTest.java @@ -0,0 +1,112 @@ +/* + * Copyright © 2023 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.repository.query; + +import static software.xdev.spring.data.eclipse.store.repository.query.QueryCreatorUtil.Customer; +import static software.xdev.spring.data.eclipse.store.repository.query.QueryCreatorUtil.DATA_CUSTOMERS_DABC_ABCD; +import static software.xdev.spring.data.eclipse.store.repository.query.QueryCreatorUtil.DATA_CUSTOMERS_EMPTY; +import static software.xdev.spring.data.eclipse.store.repository.query.QueryCreatorUtil.DATA_CUSTOMERS_ONE; +import static software.xdev.spring.data.eclipse.store.repository.query.QueryCreatorUtil.DATA_CUSTOMERS_THREE; +import static software.xdev.spring.data.eclipse.store.repository.query.QueryCreatorUtil.DATA_CUSTOMERS_TWO; +import static software.xdev.spring.data.eclipse.store.repository.query.QueryCreatorUtil.executeQuery; + +import java.lang.reflect.Method; +import java.util.Collection; +import java.util.List; +import java.util.stream.Stream; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; +import org.springframework.data.repository.Repository; + + +class EclipseStoreQueryCreatorCollectionTest +{ + + static Stream generateDataWithCountOfIdIn() + { + return Stream.of( + Arguments.of(DATA_CUSTOMERS_EMPTY, 0), + Arguments.of(DATA_CUSTOMERS_ONE, 0), + Arguments.of(DATA_CUSTOMERS_TWO, 1), + Arguments.of(DATA_CUSTOMERS_THREE, 2), + Arguments.of(DATA_CUSTOMERS_DABC_ABCD, 2) + ); + } + + @ParameterizedTest + @MethodSource("generateDataWithCountOfIdIn") + void findByIdIn(final Collection entities, final int expectedCount) + throws NoSuchMethodException + { + final Method method = CustomerRepository.class.getMethod("findByIdIn", Collection.class); + final Collection foundCustomer = + executeQuery(entities, Customer.class, method, new Object[]{List.of(2, 3)}); + Assertions.assertEquals(expectedCount, foundCustomer.size()); + } + + @Test + void findByIdInNull() + throws NoSuchMethodException + { + final Method method = CustomerRepository.class.getMethod("findByIdIn", Collection.class); + final Collection foundCustomer = + executeQuery(DATA_CUSTOMERS_THREE, Customer.class, method, new Object[]{null}); + Assertions.assertEquals(0, foundCustomer.size()); + } + + static Stream generateDataWithCountOfIdNotIn() + { + return Stream.of( + Arguments.of(DATA_CUSTOMERS_EMPTY, 0), + Arguments.of(DATA_CUSTOMERS_ONE, 1), + Arguments.of(DATA_CUSTOMERS_TWO, 1), + Arguments.of(DATA_CUSTOMERS_THREE, 1), + Arguments.of(DATA_CUSTOMERS_DABC_ABCD, 2) + ); + } + + @ParameterizedTest + @MethodSource("generateDataWithCountOfIdNotIn") + void findByIdNotIn(final Collection entities, final int expectedCount) + throws NoSuchMethodException + { + final Method method = CustomerRepository.class.getMethod("findByIdNotIn", Collection.class); + final Collection foundCustomer = + executeQuery(entities, Customer.class, method, new Object[]{List.of(2, 3)}); + Assertions.assertEquals(expectedCount, foundCustomer.size()); + } + + @Test + void findByIdNotInNull() + throws NoSuchMethodException + { + final Method method = CustomerRepository.class.getMethod("findByIdNotIn", Collection.class); + final Collection foundCustomer = + executeQuery(DATA_CUSTOMERS_THREE, Customer.class, method, new Object[]{null}); + Assertions.assertEquals(3, foundCustomer.size()); + } + + private interface CustomerRepository extends Repository + { + List findByIdIn(final Collection ids); + + List findByIdNotIn(final Collection ids); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/EclipseStoreQueryCreatorGreaterLessTest.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/EclipseStoreQueryCreatorGreaterLessTest.java new file mode 100644 index 00000000..ca454a97 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/EclipseStoreQueryCreatorGreaterLessTest.java @@ -0,0 +1,266 @@ +/* + * Copyright © 2023 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.repository.query; + +import java.lang.reflect.Method; +import java.util.Collection; +import java.util.List; +import java.util.stream.Stream; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; +import org.springframework.data.repository.Repository; + +import software.xdev.spring.data.eclipse.store.exceptions.NotComparableException; +import software.xdev.spring.data.eclipse.store.helper.TestData; + + +class EclipseStoreQueryCreatorGreaterLessTest +{ + static Stream generateDataWithIdLessThan() + { + return Stream.of( + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_EMPTY, 0), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_ONE, 1), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_TWO, 2), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_THREE, 2), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_DABC_ABCD, 2) + ); + } + + @ParameterizedTest + @MethodSource("generateDataWithIdLessThan") + void findByIdLessThan(final Collection entities, final int expectedCount) + throws NoSuchMethodException + { + final Method method = CustomerRepository.class.getMethod("findByIdLessThan", int.class); + final Collection foundCustomer = + QueryCreatorUtil.executeQuery( + entities, + QueryCreatorUtil.Customer.class, + method, + new Object[]{3}); + Assertions.assertEquals(expectedCount, foundCustomer.size()); + } + + static Stream generateDataWithIdLessThanEqual() + { + return Stream.of( + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_EMPTY, 0), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_ONE, 1), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_TWO, 2), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_THREE, 3), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_DABC_ABCD, 3) + ); + } + + @ParameterizedTest + @MethodSource("generateDataWithIdLessThanEqual") + void findByIdLessThanEqual(final Collection entities, final int expectedCount) + throws NoSuchMethodException + { + final Method method = CustomerRepository.class.getMethod("findByIdLessThanEqual", int.class); + final Collection foundCustomer = + QueryCreatorUtil.executeQuery( + entities, + QueryCreatorUtil.Customer.class, + method, + new Object[]{3}); + Assertions.assertEquals(expectedCount, foundCustomer.size()); + } + + static Stream generateDataWithIdGreaterThan() + { + return Stream.of( + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_EMPTY, 0), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_ONE, 0), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_TWO, 0), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_THREE, 1), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_DABC_ABCD, 2) + ); + } + + @ParameterizedTest + @MethodSource("generateDataWithIdGreaterThan") + void findByIdGreaterThan(final Collection entities, final int expectedCount) + throws NoSuchMethodException + { + final Method method = CustomerRepository.class.getMethod("findByIdGreaterThan", int.class); + final Collection foundCustomer = + QueryCreatorUtil.executeQuery( + entities, + QueryCreatorUtil.Customer.class, + method, + new Object[]{2}); + Assertions.assertEquals(expectedCount, foundCustomer.size()); + } + + static Stream generateDataWithIdGreaterThanEqual() + { + return Stream.of( + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_EMPTY, 0), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_ONE, 0), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_TWO, 1), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_THREE, 2), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_DABC_ABCD, 3) + ); + } + + @ParameterizedTest + @MethodSource("generateDataWithIdGreaterThanEqual") + void findByIdGreaterThanEqual(final Collection entities, final int expectedCount) + throws NoSuchMethodException + { + final Method method = CustomerRepository.class.getMethod("findByIdGreaterThanEqual", int.class); + final Collection foundCustomer = + QueryCreatorUtil.executeQuery( + entities, + QueryCreatorUtil.Customer.class, + method, + new Object[]{2}); + Assertions.assertEquals(expectedCount, foundCustomer.size()); + } + + static Stream generateDataWithIdBetween() + { + return Stream.of( + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_EMPTY, 0), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_ONE, 0), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_TWO, 1), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_THREE, 2), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_DABC_ABCD, 3) + ); + } + + @ParameterizedTest + @MethodSource("generateDataWithIdBetween") + void findByIdBetween(final Collection entities, final int expectedCount) + throws NoSuchMethodException + { + final Method method = CustomerRepository.class.getMethod("findByIdBetween", int.class, int.class); + final Collection foundCustomer = + QueryCreatorUtil.executeQuery( + entities, + QueryCreatorUtil.Customer.class, + method, + new Object[]{2, 4}); + Assertions.assertEquals(expectedCount, foundCustomer.size()); + } + + @ParameterizedTest + @MethodSource("generateDataWithIdBetween") + void findByIdBetweenInvalidRange(final Collection entities) + throws NoSuchMethodException + { + final Method method = CustomerRepository.class.getMethod("findByIdBetween", int.class, int.class); + final Collection foundCustomer = + QueryCreatorUtil.executeQuery( + entities, + QueryCreatorUtil.Customer.class, + method, + new Object[]{4, 2}); + Assertions.assertEquals(0, foundCustomer.size()); + } + + static Stream generateDataWithFirstNameGreaterThan() + { + return Stream.of( + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_EMPTY, 0), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_ONE, 0), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_TWO, 1), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_THREE, 1), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_DABC_ABCD, 0) + ); + } + + @ParameterizedTest + @MethodSource("generateDataWithFirstNameGreaterThan") + void findByFirstNameGreaterThan(final Collection entities, final int expectedCount) + throws NoSuchMethodException + { + final Method method = CustomerRepository.class.getMethod("findByFirstNameGreaterThan", String.class); + final Collection foundCustomer = + QueryCreatorUtil.executeQuery( + entities, + QueryCreatorUtil.Customer.class, + method, + new Object[]{TestData.FIRST_NAME}); + Assertions.assertEquals(expectedCount, foundCustomer.size()); + } + + static Stream generateDataWithFirstNameLessThan() + { + return Stream.of( + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_EMPTY, 0), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_ONE, 1), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_TWO, 1), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_THREE, 2), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_DABC_ABCD, 4) + ); + } + + @ParameterizedTest + @MethodSource("generateDataWithFirstNameLessThan") + void findByFirstNameLessThan(final Collection entities, final int expectedCount) + throws NoSuchMethodException + { + final Method method = CustomerRepository.class.getMethod("findByFirstNameLessThan", String.class); + final Collection foundCustomer = + QueryCreatorUtil.executeQuery( + entities, + QueryCreatorUtil.Customer.class, + method, + new Object[]{TestData.FIRST_NAME_ALTERNATIVE}); + Assertions.assertEquals(expectedCount, foundCustomer.size()); + } + + @Test + void findByIncomparableLessThan() + throws NoSuchMethodException + { + final Method method = + CustomerRepository.class.getMethod("findByIncomparableLessThan", QueryCreatorUtil.Incomparable.class); + final QueryCreatorUtil.Incomparable incomparable = new QueryCreatorUtil.Incomparable(""); + Assertions.assertThrows(NotComparableException.class, () -> + QueryCreatorUtil.executeQuery( + QueryCreatorUtil.DATA_CUSTOMERS_THREE, + QueryCreatorUtil.Customer.class, + method, + new Object[]{incomparable})); + } + + private interface CustomerRepository extends Repository + { + List findByIdLessThan(final int maxIdExcluding); + + List findByIdLessThanEqual(final int maxIdIncluding); + + List findByIdGreaterThan(final int minIdExcluding); + + List findByIdGreaterThanEqual(final int minIdIncluding); + + List findByFirstNameGreaterThan(final String minStringExcluding); + + List findByFirstNameLessThan(final String maxStringExcluding); + + List findByIncomparableLessThan(final QueryCreatorUtil.Incomparable lessIncomparable); + + List findByIdBetween(final int minIdIncluding, final int maxIdIncluding); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/EclipseStoreQueryCreatorIsIsNotTest.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/EclipseStoreQueryCreatorIsIsNotTest.java new file mode 100644 index 00000000..68a42e05 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/EclipseStoreQueryCreatorIsIsNotTest.java @@ -0,0 +1,201 @@ +/* + * Copyright © 2023 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.repository.query; + +import java.lang.reflect.Method; +import java.util.Collection; +import java.util.List; +import java.util.stream.Stream; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; +import org.springframework.data.repository.Repository; + +import software.xdev.spring.data.eclipse.store.helper.TestData; + + +class EclipseStoreQueryCreatorIsIsNotTest +{ + + static Stream generateDataWithCountOfFirstName() + { + return Stream.of( + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_EMPTY, 0), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_ONE, 1), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_TWO, 1), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_THREE, 2), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_DABC_ABCD, 0) + ); + } + + @ParameterizedTest + @MethodSource("generateDataWithCountOfFirstName") + void findByFirstName(final Collection entities, final int expectedCount) + throws NoSuchMethodException + { + final Method method = CustomerRepository.class.getMethod("findByFirstName", String.class); + final Collection foundCustomer = + QueryCreatorUtil.executeQuery(entities, QueryCreatorUtil.Customer.class, method, new Object[]{TestData.FIRST_NAME}); + Assertions.assertEquals(expectedCount, foundCustomer.size()); + } + + @ParameterizedTest + @MethodSource("generateDataWithCountOfFirstName") + void findByFirstNameIsNull(final Collection entities) + throws NoSuchMethodException + { + final Method method = CustomerRepository.class.getMethod("findByFirstName", String.class); + final Collection foundCustomer = + QueryCreatorUtil.executeQuery(entities, QueryCreatorUtil.Customer.class, method, new Object[]{null}); + Assertions.assertEquals(0, foundCustomer.size()); + } + + static Stream generateDataWithCountOfId1() + { + return Stream.of( + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_EMPTY, 0), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_ONE, 1), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_TWO, 1), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_THREE, 1), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_DABC_ABCD, 1) + ); + } + + @ParameterizedTest + @MethodSource("generateDataWithCountOfId1") + void findById( + final Collection entities, + final int expectedCount) throws NoSuchMethodException + { + final Method method = CustomerRepository.class.getMethod("findById", int.class); + final Collection foundCustomer = + QueryCreatorUtil.executeQuery( + entities, + QueryCreatorUtil.Customer.class, + method, + new Object[]{1}); + Assertions.assertEquals(expectedCount, foundCustomer.size()); + } + + static Stream generateDataWithIncomparable() + { + return Stream.of( + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_EMPTY, 0), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_ONE, 1), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_TWO, 2), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_THREE, 2), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_DABC_ABCD, 3) + ); + } + + /** + * Test to see if {@link Object#equals(Object)} is used for the {@code is} implementation instead of the {@code ==} + */ + @ParameterizedTest + @MethodSource("generateDataWithIncomparable") + void findByIncomparable( + final Collection entities, + final int expectedCount) throws NoSuchMethodException + { + final Method method = CustomerRepository.class.getMethod( + "findByIncomparable", + QueryCreatorUtil.Incomparable.class); + final Collection foundCustomer = + QueryCreatorUtil.executeQuery( + entities, + QueryCreatorUtil.Customer.class, + method, + new Object[]{new QueryCreatorUtil.Incomparable("")}); + Assertions.assertEquals(expectedCount, foundCustomer.size()); + } + + @ParameterizedTest + @MethodSource("generateDataWithIncomparable") + void findByIncomparableIsNotNull( + final Collection entities, + final int expectedCount) throws NoSuchMethodException + { + final Method method = CustomerRepository.class.getMethod( + "findByIncomparableIsNotNull"); + final Collection foundCustomer = + QueryCreatorUtil.executeQuery( + entities, + QueryCreatorUtil.Customer.class, + method, + new Object[]{}); + Assertions.assertEquals(expectedCount, foundCustomer.size()); + } + + static Stream generateDataWithIncomparableIsNull() + { + return Stream.of( + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_EMPTY, 0), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_ONE, 0), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_TWO, 0), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_THREE, 1), + Arguments.of(QueryCreatorUtil.DATA_CUSTOMERS_DABC_ABCD, 1) + ); + } + + @ParameterizedTest + @MethodSource("generateDataWithIncomparableIsNull") + void findByIncomparableIsNullDynamic( + final Collection entities, + final int expectedCount) throws NoSuchMethodException + { + final Method method = CustomerRepository.class.getMethod( + "findByIncomparable", + QueryCreatorUtil.Incomparable.class); + final Collection foundCustomer = + QueryCreatorUtil.executeQuery( + entities, + QueryCreatorUtil.Customer.class, + method, + new Object[]{null}); + Assertions.assertEquals(expectedCount, foundCustomer.size()); + } + + @ParameterizedTest + @MethodSource("generateDataWithIncomparableIsNull") + void findByIncomparableIsNull( + final Collection entities, + final int expectedCount) throws NoSuchMethodException + { + final Method method = CustomerRepository.class.getMethod("findByIncomparableIsNull"); + final Collection foundCustomer = + QueryCreatorUtil.executeQuery( + entities, + QueryCreatorUtil.Customer.class, + method, + new Object[]{}); + Assertions.assertEquals(expectedCount, foundCustomer.size()); + } + + private interface CustomerRepository extends Repository + { + List findByFirstName(final String firstName); + + List findById(final int id); + + List findByIncomparable(final QueryCreatorUtil.Incomparable incomparableObject); + + List findByIncomparableIsNull(); + + List findByIncomparableIsNotNull(); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/EclipseStoreQueryCreatorStringTest.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/EclipseStoreQueryCreatorStringTest.java new file mode 100644 index 00000000..f05f6589 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/EclipseStoreQueryCreatorStringTest.java @@ -0,0 +1,201 @@ +/* + * Copyright © 2023 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.repository.query; + +import static software.xdev.spring.data.eclipse.store.repository.query.QueryCreatorUtil.Customer; +import static software.xdev.spring.data.eclipse.store.repository.query.QueryCreatorUtil.DATA_CUSTOMERS_DABC_ABCD; +import static software.xdev.spring.data.eclipse.store.repository.query.QueryCreatorUtil.DATA_CUSTOMERS_EMPTY; +import static software.xdev.spring.data.eclipse.store.repository.query.QueryCreatorUtil.DATA_CUSTOMERS_ONE; +import static software.xdev.spring.data.eclipse.store.repository.query.QueryCreatorUtil.DATA_CUSTOMERS_THREE; +import static software.xdev.spring.data.eclipse.store.repository.query.QueryCreatorUtil.DATA_CUSTOMERS_TWO; +import static software.xdev.spring.data.eclipse.store.repository.query.QueryCreatorUtil.DATA_CUSTOMERS_WITH_NULL_STRING; +import static software.xdev.spring.data.eclipse.store.repository.query.QueryCreatorUtil.executeQuery; + +import java.lang.reflect.Method; +import java.util.Collection; +import java.util.List; +import java.util.stream.Stream; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; +import org.springframework.data.repository.Repository; + +import software.xdev.spring.data.eclipse.store.helper.TestData; + + +class EclipseStoreQueryCreatorStringTest +{ + + static Stream generateDataWithCountOfFirstNameLike() + { + return Stream.of( + Arguments.of("%", 3), + Arguments.of("M%", 2), + Arguments.of("m%", 2), + Arguments.of("m_ck", 2), + Arguments.of("%ick", 2), + Arguments.of("%k", 2), + Arguments.of("%ck%", 2), + Arguments.of("%ev%", 1), + Arguments.of("Mick", 2), + Arguments.of("M%k", 2), + Arguments.of("M_k", 0), + Arguments.of("M__k", 2), + Arguments.of("Mic_", 2), + Arguments.of("_ick", 2), + Arguments.of("____", 2), + Arguments.of("_", 0), + Arguments.of("", 0), + Arguments.of("Mic", 0) + ); + } + + @ParameterizedTest + @MethodSource("generateDataWithCountOfFirstNameLike") + void findByFirstNameLike(final String likeString, final int expectedCount) + throws NoSuchMethodException + { + final Method method = CustomerRepository.class.getMethod("findByFirstNameLike", String.class); + final Collection foundCustomer = + executeQuery(DATA_CUSTOMERS_THREE, Customer.class, method, new Object[]{likeString}); + Assertions.assertEquals(expectedCount, foundCustomer.size()); + } + + @Test + void findByFirstNameLikeNullStrings() + throws NoSuchMethodException + { + final Method method = CustomerRepository.class.getMethod("findByFirstNameLike", String.class); + final Collection foundCustomer = + executeQuery(DATA_CUSTOMERS_WITH_NULL_STRING, Customer.class, method, new Object[]{"%"}); + Assertions.assertEquals(3, foundCustomer.size()); + } + + static Stream generateDataWithCountOfFirstNameNotLike() + { + return Stream.of( + Arguments.of("%", 0), + Arguments.of("M%", 1), + Arguments.of("m%", 1), + Arguments.of("m_ck", 1), + Arguments.of("%ick", 1), + Arguments.of("%k", 1), + Arguments.of("%ck%", 1), + Arguments.of("%ev%", 2), + Arguments.of("Mick", 1), + Arguments.of("M%k", 1), + Arguments.of("M_k", 3), + Arguments.of("M__k", 1), + Arguments.of("Mic_", 1), + Arguments.of("_ick", 1), + Arguments.of("____", 1), + Arguments.of("_", 3), + Arguments.of("", 3), + Arguments.of("Mic", 3) + ); + } + + @ParameterizedTest + @MethodSource("generateDataWithCountOfFirstNameNotLike") + void findByFirstNameNotLike(final String likeString, final int expectedCount) + throws NoSuchMethodException + { + final Method method = CustomerRepository.class.getMethod("findByFirstNameNotLike", String.class); + final Collection foundCustomer = + executeQuery(DATA_CUSTOMERS_THREE, Customer.class, method, new Object[]{likeString}); + Assertions.assertEquals(expectedCount, foundCustomer.size()); + } + + @Test + void findByFirstNameNotLikeNullStrings() + throws NoSuchMethodException + { + final Method method = CustomerRepository.class.getMethod("findByFirstNameNotLike", String.class); + final Collection foundCustomer = + executeQuery(DATA_CUSTOMERS_WITH_NULL_STRING, Customer.class, method, new Object[]{"%"}); + Assertions.assertEquals(0, foundCustomer.size()); + } + + static Stream generateDataWithFirstNameStartingWith() + { + return Stream.of( + Arguments.of(DATA_CUSTOMERS_EMPTY, 0), + Arguments.of(DATA_CUSTOMERS_ONE, 1), + Arguments.of(DATA_CUSTOMERS_TWO, 1), + Arguments.of(DATA_CUSTOMERS_THREE, 2), + Arguments.of(DATA_CUSTOMERS_DABC_ABCD, 0), + Arguments.of(DATA_CUSTOMERS_WITH_NULL_STRING, 1) + ); + } + + @ParameterizedTest + @MethodSource("generateDataWithFirstNameStartingWith") + void findByFirstNameStartingWith(final Collection entities, final int expectedCount) + throws NoSuchMethodException + { + final Method method = CustomerRepository.class.getMethod("findByFirstNameStartingWith", String.class); + final Collection foundCustomer = executeQuery( + entities, + Customer.class, + method, + new Object[]{TestData.FIRST_NAME.substring(0, 1)}); + Assertions.assertEquals(expectedCount, foundCustomer.size()); + } + + @ParameterizedTest + @MethodSource("generateDataWithFirstNameStartingWith") + void findByFirstNameEndingWith(final Collection entities, final int expectedCount) + throws NoSuchMethodException + { + final Method method = CustomerRepository.class.getMethod("findByFirstNameEndingWith", String.class); + final Collection foundCustomer = executeQuery( + entities, + Customer.class, + method, + new Object[]{TestData.FIRST_NAME.substring(2, 4)}); + Assertions.assertEquals(expectedCount, foundCustomer.size()); + } + + @ParameterizedTest + @MethodSource("generateDataWithFirstNameStartingWith") + void findByFirstNameContainingWith(final Collection entities, final int expectedCount) + throws NoSuchMethodException + { + final Method method = CustomerRepository.class.getMethod("findByFirstNameContaining", String.class); + final Collection foundCustomer = executeQuery( + entities, + Customer.class, + method, + new Object[]{TestData.FIRST_NAME.substring(1, 3)}); + Assertions.assertEquals(expectedCount, foundCustomer.size()); + } + + private interface CustomerRepository extends Repository + { + List findByFirstNameLike(final String regexFirstName); + + List findByFirstNameNotLike(final String regexFirstName); + + List findByFirstNameStartingWith(final String startingFirstName); + + List findByFirstNameEndingWith(final String endingFirstName); + + List findByFirstNameContaining(final String containingFirstName); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/QueryCreatorUtil.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/QueryCreatorUtil.java new file mode 100644 index 00000000..c0351394 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/QueryCreatorUtil.java @@ -0,0 +1,95 @@ +/* + * Copyright © 2023 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.repository.query; + +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import org.springframework.data.repository.core.support.DefaultRepositoryMetadata; +import org.springframework.data.repository.query.DefaultParameters; +import org.springframework.data.repository.query.ParametersParameterAccessor; +import org.springframework.data.repository.query.ParametersSource; +import org.springframework.data.repository.query.parser.PartTree; +import org.springframework.data.util.TypeInformation; + +import software.xdev.spring.data.eclipse.store.helper.DummyWorkingCopier; +import software.xdev.spring.data.eclipse.store.helper.TestData; + + +public class QueryCreatorUtil +{ + + public final static Collection DATA_CUSTOMERS_EMPTY = + new ArrayList<>(); + public final static Collection DATA_CUSTOMERS_ONE = + List.of(new Customer(1, TestData.FIRST_NAME, TestData.LAST_NAME, new Incomparable(""), true)); + public final static Collection DATA_CUSTOMERS_TWO = List.of( + new Customer(1, TestData.FIRST_NAME, TestData.LAST_NAME, new Incomparable(""), true), + new Customer( + 2, + TestData.FIRST_NAME_ALTERNATIVE, + TestData.LAST_NAME_ALTERNATIVE, new Incomparable(""), false)); + public final static Collection DATA_CUSTOMERS_THREE = List.of( + new Customer(1, TestData.FIRST_NAME, TestData.LAST_NAME, new Incomparable(""), true), + new Customer( + 2, + TestData.FIRST_NAME_ALTERNATIVE, + TestData.LAST_NAME_ALTERNATIVE, new Incomparable(""), false), + new Customer(3, TestData.FIRST_NAME, TestData.LAST_NAME_ALTERNATIVE, null, false)); + public final static Collection DATA_CUSTOMERS_DABC_ABCD = List.of( + new Customer(1, "D", "A", new Incomparable(""), true), + new Customer(2, "A", "B", new Incomparable(""), false), + new Customer(3, "B", "C", new Incomparable(""), true), + new Customer(4, "C", "D", null, false)); + public final static Collection DATA_CUSTOMERS_WITH_NULL_STRING = List.of( + new Customer(1, TestData.FIRST_NAME, TestData.LAST_NAME, new Incomparable(""), true), + new Customer(2, null, TestData.LAST_NAME_ALTERNATIVE, new Incomparable(""), false), + new Customer(3, TestData.FIRST_NAME_ALTERNATIVE, null, new Incomparable(""), true), + new Customer(4, TestData.FIRST_NAME_ALTERNATIVE, TestData.LAST_NAME_ALTERNATIVE, null, false)); + + @SuppressWarnings("unchecked") + public static Collection executeQuery( + final Collection entities, + final Class domainClass, + final Method method, + final Object[] values) + { + final PartTree tree = new PartTree(method.getName(), domainClass); + final TypeInformation typeInformation = (TypeInformation)TypeInformation.fromReturnTypeOf(method); + + final DefaultParameters parameters = + new DefaultParameters(ParametersSource.of( + new DefaultRepositoryMetadata(method.getDeclaringClass()), + method)); + + final ParametersParameterAccessor accessor = new ParametersParameterAccessor(parameters, values); + final EclipseStoreQueryCreator creator = + new EclipseStoreQueryCreator<>(domainClass, typeInformation, new DummyWorkingCopier<>(), tree, accessor); + + return (Collection)creator.createQuery().execute(domainClass, entities, values); + } + + public record Customer(int id, String firstName, String lastName, Incomparable incomparable, boolean enabled) + { + } + + + public record Incomparable(String value) + { + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/executors/PageableSortableCollectionQuerierTest.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/executors/PageableSortableCollectionQuerierTest.java new file mode 100644 index 00000000..97265e63 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/executors/PageableSortableCollectionQuerierTest.java @@ -0,0 +1,220 @@ +/* + * Copyright © 2023 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.repository.query.executors; + +import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.stream.Stream; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; +import org.springframework.data.domain.Pageable; +import org.springframework.data.domain.Sort; + +import software.xdev.spring.data.eclipse.store.helper.DummyWorkingCopier; +import software.xdev.spring.data.eclipse.store.helper.TestData; +import software.xdev.spring.data.eclipse.store.repository.query.ReflectedField; +import software.xdev.spring.data.eclipse.store.repository.query.criteria.Criteria; +import software.xdev.spring.data.eclipse.store.repository.query.criteria.CriteriaSingleNode; + + +class PageableSortableCollectionQuerierTest +{ + private final static Field customerFirstNameField; + + static + { + try + { + customerFirstNameField = Customer.class.getDeclaredField("firstName"); + } + catch(final NoSuchFieldException e) + { + throw new RuntimeException(e); + } + } + + private final static Collection DATA_CUSTOMERS_EMPTY = new ArrayList<>(); + private final static Collection DATA_CUSTOMERS_ONE = + List.of(new Customer(TestData.FIRST_NAME, TestData.LAST_NAME)); + private final static Collection DATA_CUSTOMERS_TWO = List.of( + new Customer(TestData.FIRST_NAME, TestData.LAST_NAME), + new Customer(TestData.FIRST_NAME_ALTERNATIVE, TestData.LAST_NAME_ALTERNATIVE)); + private final static Collection DATA_CUSTOMERS_THREE = List.of( + new Customer(TestData.FIRST_NAME, TestData.LAST_NAME), + new Customer(TestData.FIRST_NAME_ALTERNATIVE, TestData.LAST_NAME_ALTERNATIVE), + new Customer(TestData.FIRST_NAME, TestData.LAST_NAME)); + private final static Collection DATA_CUSTOMERS_DABC_ABCD = List.of( + new Customer("D", "A"), + new Customer("A", "B"), + new Customer("B", "C"), + new Customer("C", "D")); + + static Stream generateData() + { + // Columns of arguments: + // 1: Collection of Customer + // 2: Count of Customer with first name = TestData.FIRST_NAME + return Stream.of( + Arguments.of(DATA_CUSTOMERS_EMPTY, 0), + Arguments.of(DATA_CUSTOMERS_ONE, 1), + Arguments.of(DATA_CUSTOMERS_TWO, 1), + Arguments.of(DATA_CUSTOMERS_THREE, 2), + Arguments.of(DATA_CUSTOMERS_DABC_ABCD, 0) + ); + } + + @ParameterizedTest + @MethodSource("generateData") + void getEntities_NoCriteria_NoPageable_NoSortable(final Collection entities) + { + final PageableSortableCollectionQuerier querier = new PageableSortableCollectionQuerier<>( + new DummyWorkingCopier<>(), + Criteria.createNoCriteria() + ); + Assertions.assertEquals(entities.size(), querier.getEntities(entities, Customer.class).size()); + } + + @ParameterizedTest + @MethodSource("generateData") + void getEntities_EmptyCriteria_NoPageable_NoSortable(final Collection entities) + { + final PageableSortableCollectionQuerier querier = new PageableSortableCollectionQuerier<>( + new DummyWorkingCopier<>(), + new CriteriaSingleNode<>() + ); + Assertions.assertEquals(entities.size(), querier.getEntities(entities, Customer.class).size()); + } + + @ParameterizedTest + @MethodSource("generateData") + void getEntities_EmptyCriteria_NoPageable_Sortable_SameSize(final Collection entities) + { + final PageableSortableCollectionQuerier querier = new PageableSortableCollectionQuerier<>( + new DummyWorkingCopier<>(), + new CriteriaSingleNode<>() + ); + final List sortedCustomers = + querier.getEntities(entities, Pageable.unpaged(), Customer.class, Sort.by("firstName")); + Assertions.assertEquals(entities.size(), sortedCustomers.size()); + } + + @ParameterizedTest + @MethodSource("generateData") + void getEntities_EmptyCriteria_Pageable_Sortable_FixedSize(final Collection entities) + { + final PageableSortableCollectionQuerier querier = new PageableSortableCollectionQuerier<>( + new DummyWorkingCopier<>(), + new CriteriaSingleNode<>() + ); + final Pageable pageable = Pageable.ofSize(2); + final List pagedCustomers = querier.getEntities(entities, pageable, Customer.class); + final int expectedCount = Math.min(pagedCustomers.size(), 2); + Assertions.assertEquals(expectedCount, pagedCustomers.size()); + } + + @Test + void getEntities_EmptyCriteria_Pageable_Sortable_MultiplePages() + { + final PageableSortableCollectionQuerier querier = new PageableSortableCollectionQuerier<>( + new DummyWorkingCopier<>(), + new CriteriaSingleNode<>() + ); + final Pageable pageable = Pageable.ofSize(2); + final List pagedCustomersPage1 = querier.getEntities(DATA_CUSTOMERS_THREE, pageable, Customer.class); + Assertions.assertEquals(2, pagedCustomersPage1.size()); + + final List pagedCustomersPage2 = + querier.getEntities(DATA_CUSTOMERS_THREE, pageable.next(), Customer.class); + Assertions.assertEquals(1, pagedCustomersPage2.size()); + } + + @Test + void getEntities_EmptyCriteria_NoPageable_Sortable_IsSortedByFirstName() + { + final PageableSortableCollectionQuerier querier = new PageableSortableCollectionQuerier<>( + new DummyWorkingCopier<>(), + new CriteriaSingleNode<>() + ); + final List sortedCustomers = + querier.getEntities(DATA_CUSTOMERS_DABC_ABCD, Pageable.unpaged(), Customer.class, Sort.by("firstName")); + Assertions.assertEquals("A", sortedCustomers.get(0).firstName); + Assertions.assertEquals("B", sortedCustomers.get(1).firstName); + Assertions.assertEquals("C", sortedCustomers.get(2).firstName); + Assertions.assertEquals("D", sortedCustomers.get(3).firstName); + } + + @Test + void getEntities_EmptyCriteria_NoPageable_Sortable_IsSortedByLastName() + { + final PageableSortableCollectionQuerier querier = new PageableSortableCollectionQuerier<>( + new DummyWorkingCopier<>(), + new CriteriaSingleNode<>() + ); + final List sortedCustomers = + querier.getEntities(DATA_CUSTOMERS_DABC_ABCD, Pageable.unpaged(), Customer.class, Sort.by("lastName")); + Assertions.assertEquals("A", sortedCustomers.get(0).lastName); + Assertions.assertEquals("B", sortedCustomers.get(1).lastName); + Assertions.assertEquals("C", sortedCustomers.get(2).lastName); + Assertions.assertEquals("D", sortedCustomers.get(3).lastName); + } + + @Test + void getEntities_EmptyCriteria_NoPageable_Sortable_IsSortedByInvalidProperty() + { + final PageableSortableCollectionQuerier querier = new PageableSortableCollectionQuerier<>( + new DummyWorkingCopier<>(), + new CriteriaSingleNode<>() + ); + final Pageable unpaged = Pageable.unpaged(); + final Sort invalid = Sort.by("invalid"); + Assertions.assertThrows( + RuntimeException.class, + () -> querier.getEntities(DATA_CUSTOMERS_DABC_ABCD, unpaged, Customer.class, invalid)); + } + + @ParameterizedTest + @MethodSource("generateData") + void getEntities_CriteriaFirstName_NoPageable_NoSortable( + final Collection entities, + final int countOfEntitiesWithFirstName) + { + final PageableSortableCollectionQuerier querier = new PageableSortableCollectionQuerier<>( + new DummyWorkingCopier<>(), + new CriteriaSingleNode<>(new ReflectedField(customerFirstNameField)).is(TestData.FIRST_NAME) + ); + Assertions.assertEquals(countOfEntitiesWithFirstName, querier.getEntities(entities, Customer.class).size()); + } + + @Test + void getEntities_NoCriteria_NoPageable_NoSortable_Null() + { + final PageableSortableCollectionQuerier querier = new PageableSortableCollectionQuerier<>( + new DummyWorkingCopier<>(), + Criteria.createNoCriteria() + ); + Assertions.assertThrows(NullPointerException.class, () -> querier.getEntities(null, Customer.class)); + } + + private record Customer(String firstName, String lastName) + { + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/support/copier/DataTypeUtilTest.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/support/copier/DataTypeUtilTest.java new file mode 100644 index 00000000..b1ec1493 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/support/copier/DataTypeUtilTest.java @@ -0,0 +1,98 @@ +/* + * Copyright © 2023 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.repository.support.copier; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + + +class DataTypeUtilTest +{ + @SuppressWarnings("ConstantValue") + @Test + void isObjectArray() + { + Assertions.assertTrue(DataTypeUtil.isObjectArray(new Object[]{})); + Assertions.assertTrue(DataTypeUtil.isObjectArray(new Object[]{new Object()})); + Assertions.assertTrue(DataTypeUtil.isObjectArray(new Object[]{new Object(), new Object()})); + Assertions.assertTrue(DataTypeUtil.isObjectArray(new Object[]{null})); + Assertions.assertTrue(DataTypeUtil.isObjectArray(new Object[]{null, new Object()})); + Assertions.assertTrue(DataTypeUtil.isObjectArray(new String[]{"test"})); + + Assertions.assertFalse(DataTypeUtil.isObjectArray(null)); + Assertions.assertFalse(DataTypeUtil.isObjectArray(new int[]{})); + Assertions.assertFalse(DataTypeUtil.isObjectArray(new int[]{1})); + Assertions.assertFalse(DataTypeUtil.isObjectArray(new int[]{1, 2})); + Assertions.assertFalse(DataTypeUtil.isObjectArray(new Object())); + Assertions.assertFalse(DataTypeUtil.isObjectArray(new long[]{1})); + Assertions.assertFalse(DataTypeUtil.isObjectArray(new double[]{1})); + Assertions.assertFalse(DataTypeUtil.isObjectArray(new byte[]{1})); + Assertions.assertFalse(DataTypeUtil.isObjectArray(new char[]{'c'})); + Assertions.assertFalse(DataTypeUtil.isObjectArray(new float[]{1})); + Assertions.assertFalse(DataTypeUtil.isObjectArray(new short[]{1})); + } + + @SuppressWarnings("ConstantValue") + @Test + void isPrimitiveArray() + { + Assertions.assertTrue(DataTypeUtil.isPrimitiveArray(new int[]{})); + Assertions.assertTrue(DataTypeUtil.isPrimitiveArray(new int[]{1})); + Assertions.assertTrue(DataTypeUtil.isPrimitiveArray(new int[]{1, 2})); + Assertions.assertTrue(DataTypeUtil.isPrimitiveArray(new long[]{1})); + Assertions.assertTrue(DataTypeUtil.isPrimitiveArray(new double[]{1})); + Assertions.assertTrue(DataTypeUtil.isPrimitiveArray(new byte[]{1})); + Assertions.assertTrue(DataTypeUtil.isPrimitiveArray(new char[]{'c'})); + Assertions.assertTrue(DataTypeUtil.isPrimitiveArray(new float[]{1})); + Assertions.assertTrue(DataTypeUtil.isPrimitiveArray(new short[]{1})); + + Assertions.assertFalse(DataTypeUtil.isPrimitiveArray(null)); + Assertions.assertFalse(DataTypeUtil.isPrimitiveArray(1)); + Assertions.assertFalse(DataTypeUtil.isPrimitiveArray(1L)); + Assertions.assertFalse(DataTypeUtil.isPrimitiveArray(1.0)); + Assertions.assertFalse(DataTypeUtil.isPrimitiveArray('c')); + Assertions.assertFalse(DataTypeUtil.isPrimitiveArray(1f)); + Assertions.assertFalse(DataTypeUtil.isPrimitiveArray("test")); + Assertions.assertFalse(DataTypeUtil.isPrimitiveArray(new Object())); + Assertions.assertFalse(DataTypeUtil.isPrimitiveArray(new Object[]{})); + Assertions.assertFalse(DataTypeUtil.isPrimitiveArray(new Object[]{new Object()})); + Assertions.assertFalse(DataTypeUtil.isPrimitiveArray(new Object[]{new Object(), new Object()})); + Assertions.assertFalse(DataTypeUtil.isPrimitiveArray(new Object[]{null})); + Assertions.assertFalse(DataTypeUtil.isPrimitiveArray(new Object[]{null, new Object()})); + Assertions.assertFalse(DataTypeUtil.isPrimitiveArray(new String[]{"test"})); + } + + @SuppressWarnings("DataFlowIssue") + @Test + void isPrimitiveType() + { + Assertions.assertTrue(DataTypeUtil.isPrimitiveType(Integer.class)); + Assertions.assertTrue(DataTypeUtil.isPrimitiveType(Byte.class)); + Assertions.assertTrue(DataTypeUtil.isPrimitiveType(Character.class)); + Assertions.assertTrue(DataTypeUtil.isPrimitiveType(Boolean.class)); + Assertions.assertTrue(DataTypeUtil.isPrimitiveType(Double.class)); + Assertions.assertTrue(DataTypeUtil.isPrimitiveType(Float.class)); + Assertions.assertTrue(DataTypeUtil.isPrimitiveType(Long.class)); + Assertions.assertTrue(DataTypeUtil.isPrimitiveType(Short.class)); + Assertions.assertTrue(DataTypeUtil.isPrimitiveType(String.class)); + Assertions.assertTrue(DataTypeUtil.isPrimitiveType(Void.class)); + + Assertions.assertFalse(DataTypeUtil.isPrimitiveType(Object.class)); + Assertions.assertFalse(DataTypeUtil.isPrimitiveType(Object[].class)); + + Assertions.assertThrows(NullPointerException.class, () -> DataTypeUtil.isPrimitiveType(null)); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/support/copier/object/MicroStreamRegisteringCopierTest.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/support/copier/object/MicroStreamRegisteringCopierTest.java new file mode 100644 index 00000000..1c29302f --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/support/copier/object/MicroStreamRegisteringCopierTest.java @@ -0,0 +1,136 @@ +/* + * Copyright © 2023 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.repository.support.copier.object; + +import java.util.List; +import java.util.Objects; +import java.util.stream.IntStream; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +import software.xdev.spring.data.eclipse.store.repository.WorkingCopyRegistry; + + +class EclipseStoreRegisteringCopierTest +{ + static private class DummyData + { + private final String data; + private final int number; + + public DummyData(final String data, final int number) + { + this.data = data; + this.number = number; + } + + @Override + public boolean equals(final Object o) + { + if(this == o) + { + return true; + } + if(o == null || this.getClass() != o.getClass()) + { + return false; + } + final DummyData dummyData = (DummyData)o; + return this.number == dummyData.number && Objects.equals(this.data, dummyData.data); + } + + @Override + public int hashCode() + { + return Objects.hash(this.data, this.number); + } + } + + @Test + void testCopyManyCopiesSingle() + { + try(final EclipseSerializerRegisteringCopier copier = + new EclipseSerializerRegisteringCopier(new WorkingCopyRegistry())) + { + final List originalObjects = IntStream.range(0, 1_000).mapToObj( + i -> new DummyData("Data" + i, i) + ).toList(); + + final List copiedObjects = originalObjects.stream().map(copier::copy).toList(); + + Assertions.assertIterableEquals(originalObjects, copiedObjects); + } + } + + @Test + void testCopyAgainSameObject() + { + try(final EclipseSerializerRegisteringCopier copier = + new EclipseSerializerRegisteringCopier(new WorkingCopyRegistry())) + { + final DummyData originalObject = new DummyData("Test", 1); + + final DummyData firstCopy = copier.copy(originalObject); + final DummyData secondCopy = copier.copy(originalObject); + + Assertions.assertNotSame(firstCopy, secondCopy); + } + } + + @Test + void testCopyAgainTheCopy() + { + try(final EclipseSerializerRegisteringCopier copier = + new EclipseSerializerRegisteringCopier(new WorkingCopyRegistry())) + { + final DummyData originalObject = new DummyData("Test", 1); + + final DummyData firstCopy = copier.copy(originalObject); + final DummyData secondCopy = copier.copy(firstCopy); + + Assertions.assertNotSame(originalObject, firstCopy); + Assertions.assertNotSame(firstCopy, secondCopy); + Assertions.assertNotSame(secondCopy, originalObject); + } + } + + @Test + void testCopyManyCopiesBulk() + { + try(final EclipseSerializerRegisteringCopier copier = + new EclipseSerializerRegisteringCopier(new WorkingCopyRegistry())) + { + final List originalObjects = IntStream.range(0, 100_000).mapToObj( + i -> new DummyData("Data" + i, i) + ).toList(); + + final List copiedObjects = copier.copy(originalObjects); + + Assertions.assertIterableEquals(originalObjects, copiedObjects); + } + } + + @Test + void testCopyEmpty() + { + try(final EclipseSerializerRegisteringCopier copier = + new EclipseSerializerRegisteringCopier(new WorkingCopyRegistry())) + { + Assertions.assertThrows(NullPointerException.class, () -> copier.copy(null)); + } + } +} diff --git a/spring-data-eclipse-store/src/test/resources/application.properties b/spring-data-eclipse-store/src/test/resources/application.properties new file mode 100644 index 00000000..8f7f502f --- /dev/null +++ b/spring-data-eclipse-store/src/test/resources/application.properties @@ -0,0 +1 @@ +org.eclipse.store.storage-directory=./target/tempstorage diff --git a/spring-data-eclipse-store/src/test/resources/log4j2.xml b/spring-data-eclipse-store/src/test/resources/log4j2.xml new file mode 100644 index 00000000..f4413949 --- /dev/null +++ b/spring-data-eclipse-store/src/test/resources/log4j2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + From f7b75f2fdad4e16bba84dc295d772840a17752a2 Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 23 Jan 2024 10:51:16 +0100 Subject: [PATCH 06/40] Fix checkstyle Co-Authored-By: Johannes Rabauer <8188460+JohannesRabauer@users.noreply.github.com> --- .../demo/complex/ComplexDemoApplication.java | 4 +- .../store/demo/complex/model/BaseEntity.java | 10 ++--- .../store/demo/complex/model/Person.java | 8 ++-- .../eclipse/store/demo/simple/Customer.java | 2 +- .../data/eclipse/store/demo/simple/Pet.java | 2 +- .../store/repository/EclipseStoreStorage.java | 7 +-- .../store/repository/EntitySetCollector.java | 8 ++-- .../store/repository/access/AccessHelper.java | 3 +- .../query/criteria/AbstractCriteriaNode.java | 4 +- .../query/executors/EntitySorter.java | 7 ++- .../PageableSortableCollectionQuerier.java | 9 ++-- .../query/executors/QueryExecutorCreator.java | 3 +- .../repository/support/IdFieldFinder.java | 3 +- .../support/copier/DataTypeUtil.java | 44 +++++++++---------- .../support/copier/id/IdSetter.java | 3 +- .../working/RecursiveWorkingCopier.java | 2 - .../reposyncer/RepositorySynchronizer.java | 4 +- .../store/util/GenericObjectComparer.java | 3 +- .../data/eclipse/store/util/StringUtil.java | 3 +- .../data/eclipse/store/helper/TestData.java | 6 ++- .../data/eclipse/store/helper/TestUtil.java | 9 ++-- .../store/integration/repositories/Node.java | 8 ++-- .../tests/JpaCompatibilityTest.java | 9 ++-- .../store/integration/tests/QueryTest.java | 12 +++-- ...lipseStoreQueryCreatorGreaterLessTest.java | 3 +- .../EclipseStoreQueryCreatorIsIsNotTest.java | 6 ++- .../repository/query/QueryCreatorUtil.java | 19 ++++---- ...PageableSortableCollectionQuerierTest.java | 18 ++++---- .../MicroStreamRegisteringCopierTest.java | 32 +------------- 29 files changed, 116 insertions(+), 135 deletions(-) diff --git a/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/ComplexDemoApplication.java b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/ComplexDemoApplication.java index 9b540917..c7e2c7dd 100644 --- a/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/ComplexDemoApplication.java +++ b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/ComplexDemoApplication.java @@ -17,7 +17,6 @@ package software.xdev.spring.data.eclipse.store.demo.complex; import java.time.LocalDate; -import java.time.temporal.ChronoUnit; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -125,13 +124,14 @@ private static Vet createVet() return vet; } + @SuppressWarnings("checkstyle:MagicNumber") private static Owner createOwner() { final Owner owner = new Owner(); owner.setFirstName("Stevie"); owner.setLastName("Nicks"); final Pet pet = new Pet(); - pet.setBirthDate(LocalDate.now().minus(6, ChronoUnit.WEEKS)); + pet.setBirthDate(LocalDate.now().minusWeeks(6)); pet.setName("Peter"); final PetType petType = new PetType(); petType.setName("Dog"); diff --git a/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/model/BaseEntity.java b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/model/BaseEntity.java index 49b933ac..8c692398 100644 --- a/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/model/BaseEntity.java +++ b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/model/BaseEntity.java @@ -17,11 +17,11 @@ import java.io.Serializable; -import org.springframework.data.annotation.Id; - import jakarta.persistence.GeneratedValue; import jakarta.persistence.GenerationType; +import org.springframework.data.annotation.Id; + public class BaseEntity implements Serializable { @@ -42,8 +42,8 @@ public boolean isNew() @Override public String toString() { - return "BaseEntity{" + - "id=" + this.id + - '}'; + return "BaseEntity{" + + "id=" + this.id + + '}'; } } diff --git a/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/model/Person.java b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/model/Person.java index d5aeeeff..b1eb515e 100644 --- a/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/model/Person.java +++ b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/model/Person.java @@ -44,9 +44,9 @@ public void setLastName(final String lastName) @Override public String toString() { - return "Person{" + - "firstName='" + this.firstName + '\'' + - ", lastName='" + this.lastName + '\'' + - '}'; + return "Person{" + + "firstName='" + this.firstName + '\'' + + ", lastName='" + this.lastName + '\'' + + '}'; } } diff --git a/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/simple/Customer.java b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/simple/Customer.java index 98b55e2e..007dc01c 100644 --- a/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/simple/Customer.java +++ b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/simple/Customer.java @@ -6,7 +6,7 @@ public class Customer { @Id - public String id; + private String id; private final String firstName; private final String lastName; diff --git a/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/simple/Pet.java b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/simple/Pet.java index bb0294c0..a5abd450 100644 --- a/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/simple/Pet.java +++ b/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/simple/Pet.java @@ -6,7 +6,7 @@ public class Pet { @Id - public String id; + private String id; private String name; private Integer age; diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/EclipseStoreStorage.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/EclipseStoreStorage.java index b627465c..b44f6fee 100644 --- a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/EclipseStoreStorage.java +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/EclipseStoreStorage.java @@ -23,6 +23,9 @@ import java.util.function.Consumer; import java.util.function.Supplier; +import jakarta.inject.Inject; +import jakarta.inject.Named; + import org.eclipse.serializer.persistence.types.Storer; import org.eclipse.store.integrations.spring.boot.types.EclipseStoreProvider; import org.eclipse.store.integrations.spring.boot.types.configuration.EclipseStoreProperties; @@ -32,8 +35,6 @@ import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; -import jakarta.inject.Inject; -import jakarta.inject.Named; import software.xdev.spring.data.eclipse.store.core.IdentitySet; import software.xdev.spring.data.eclipse.store.exceptions.AlreadyRegisteredException; import software.xdev.spring.data.eclipse.store.repository.support.copier.id.IdSetter; @@ -54,7 +55,7 @@ public class EclipseStoreStorage implements EntityListProvider, IdSetterProvider private final EclipseStoreProvider storeProvider; private StorageManager storageManager; - private Root root = null; + private Root root; private final WorkingCopyRegistry registry = new WorkingCopyRegistry(); private RepositorySynchronizer repositorySynchronizer; diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/EntitySetCollector.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/EntitySetCollector.java index f0c6ddb7..60b3c720 100644 --- a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/EntitySetCollector.java +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/EntitySetCollector.java @@ -31,11 +31,9 @@ public class EntitySetCollector private static final Logger LOG = LoggerFactory.getLogger(EntitySetCollector.class); private final Map, List>> childClassToParentSets = new HashMap<>(); - public EntitySetCollector - ( - final Map> entityLists, - final Map, String> entityClassToRepositoryName - ) + public EntitySetCollector( + final Map> entityLists, + final Map, String> entityClassToRepositoryName) { this.buildParentClassList(entityLists, entityClassToRepositoryName); } diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/AccessHelper.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/AccessHelper.java index f5a2a18a..29039059 100644 --- a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/AccessHelper.java +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/AccessHelper.java @@ -31,13 +31,12 @@ /** * Helps finding and handling {@link Field}s. */ -public class AccessHelper +public final class AccessHelper { private static final Logger LOG = LoggerFactory.getLogger(AccessHelper.class); private AccessHelper() { - // Only static methods } /** diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/criteria/AbstractCriteriaNode.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/criteria/AbstractCriteriaNode.java index f8290fa7..876e3e42 100644 --- a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/criteria/AbstractCriteriaNode.java +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/criteria/AbstractCriteriaNode.java @@ -111,8 +111,8 @@ public AbstractCriteriaNode between(final Object minValue, final Object maxVa Objects.requireNonNull(maxValue); this.predicates.add(entity -> { final Object value = Objects.requireNonNull(this.field).readValue(entity); - return GenericObjectComparer.isLessOrEqualTo(value, maxValue) && - GenericObjectComparer.isGreaterOrEqualTo(value, minValue); + return GenericObjectComparer.isLessOrEqualTo(value, maxValue) + && GenericObjectComparer.isGreaterOrEqualTo(value, minValue); }); return this; } diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/EntitySorter.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/EntitySorter.java index 0e993467..b34e1efb 100644 --- a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/EntitySorter.java +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/EntitySorter.java @@ -26,14 +26,13 @@ import software.xdev.spring.data.eclipse.store.util.GenericObjectComparer; -public class EntitySorter +public final class EntitySorter { private EntitySorter() { - // Only static methods } - public static Stream sortEntitiesStream(final Class clazz, final Sort sort, Stream entityStream) + public static Stream sortEntitiesStream(final Class clazz, final Sort sort, final Stream entityStream) { if(sort != null) { @@ -45,7 +44,7 @@ public static Stream sortEntitiesStream(final Class clazz, final Sort AccessHelper.getInheritedPrivateField(clazz, order.getProperty()); final Comparator comparator = EntitySorter.getComparator(fieldForOrder, order.getDirection()); - entityStream = entityStream.sorted(comparator); + return entityStream.sorted(comparator); } catch(final NoSuchFieldException e) { diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/PageableSortableCollectionQuerier.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/PageableSortableCollectionQuerier.java index 012e4c7c..25dc3923 100644 --- a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/PageableSortableCollectionQuerier.java +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/PageableSortableCollectionQuerier.java @@ -21,13 +21,14 @@ import java.util.Optional; import java.util.stream.Stream; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort; -import jakarta.annotation.Nonnull; -import jakarta.annotation.Nullable; import software.xdev.spring.data.eclipse.store.repository.query.criteria.Criteria; import software.xdev.spring.data.eclipse.store.repository.support.copier.working.WorkingCopier; @@ -92,12 +93,12 @@ private List copyEntities(final Stream filteredEntityStream) .toList(); } - private Stream pageEntityStream(final Pageable pageable, Stream entityStream) + private Stream pageEntityStream(final Pageable pageable, final Stream entityStream) { if(pageable != null && pageable.isPaged()) { final long skipCount = pageable.getOffset(); - entityStream = entityStream + return entityStream .skip(skipCount) .limit(pageable.getPageSize()); } diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/QueryExecutorCreator.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/QueryExecutorCreator.java index 2667591a..c5027e90 100644 --- a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/QueryExecutorCreator.java +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/query/executors/QueryExecutorCreator.java @@ -27,13 +27,12 @@ import software.xdev.spring.data.eclipse.store.repository.support.copier.working.WorkingCopier; -public class QueryExecutorCreator +public final class QueryExecutorCreator { private static final Logger LOG = LoggerFactory.getLogger(QueryExecutorCreator.class); private QueryExecutorCreator() { - // Only static methods } /** diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/IdFieldFinder.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/IdFieldFinder.java index 19fd7bbf..c956cf6a 100644 --- a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/IdFieldFinder.java +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/IdFieldFinder.java @@ -22,11 +22,10 @@ import software.xdev.spring.data.eclipse.store.repository.access.AccessHelper; -public class IdFieldFinder +public final class IdFieldFinder { private IdFieldFinder() { - // Only static methods available } /** diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/DataTypeUtil.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/DataTypeUtil.java index bfa12f68..0e6fc2de 100644 --- a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/DataTypeUtil.java +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/DataTypeUtil.java @@ -15,33 +15,29 @@ */ package software.xdev.spring.data.eclipse.store.repository.support.copier; -import java.util.HashSet; import java.util.Objects; +import java.util.Set; import jakarta.annotation.Nonnull; -public class DataTypeUtil + +public final class DataTypeUtil { - private static final HashSet> WRAPPER_TYPES; - - static - { - WRAPPER_TYPES = new HashSet<>(10); - WRAPPER_TYPES.add(Integer.class); - WRAPPER_TYPES.add(Byte.class); - WRAPPER_TYPES.add(Character.class); - WRAPPER_TYPES.add(Boolean.class); - WRAPPER_TYPES.add(Double.class); - WRAPPER_TYPES.add(Float.class); - WRAPPER_TYPES.add(Long.class); - WRAPPER_TYPES.add(Short.class); - WRAPPER_TYPES.add(Void.class); - WRAPPER_TYPES.add(String.class); - } + private static final Set> WRAPPER_TYPES = Set.of( + Integer.class, + Byte.class, + Character.class, + Boolean.class, + Double.class, + Float.class, + Long.class, + Short.class, + Void.class, + String.class + ); private DataTypeUtil() { - // Only static methods available } public static boolean isObjectArray(final Object obj) @@ -51,11 +47,11 @@ public static boolean isObjectArray(final Object obj) public static boolean isPrimitiveArray(final Object obj) { - return obj instanceof boolean[] || - obj instanceof byte[] || obj instanceof short[] || - obj instanceof char[] || obj instanceof int[] || - obj instanceof long[] || obj instanceof float[] || - obj instanceof double[]; + return obj instanceof boolean[] + || obj instanceof byte[] || obj instanceof short[] + || obj instanceof char[] || obj instanceof int[] + || obj instanceof long[] || obj instanceof float[] + || obj instanceof double[]; } public static boolean isPrimitiveType(@Nonnull final Class source) diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/IdSetter.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/IdSetter.java index 89df9ff0..f3a08497 100644 --- a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/IdSetter.java +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/IdSetter.java @@ -22,6 +22,7 @@ import java.util.function.Supplier; import jakarta.persistence.GeneratedValue; + import software.xdev.spring.data.eclipse.store.repository.support.IdFieldFinder; import software.xdev.spring.data.eclipse.store.repository.support.copier.id.strategy.IdFinder; @@ -29,8 +30,6 @@ /** * A IdSetter must be unique in one storage for one entity-class. It creates Ids and therefore must know all * existing entities of one class. - * - * @param */ public interface IdSetter { diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/RecursiveWorkingCopier.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/RecursiveWorkingCopier.java index 1c0d7cc4..c5d9a2c3 100644 --- a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/RecursiveWorkingCopier.java +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/RecursiveWorkingCopier.java @@ -37,8 +37,6 @@ /** * Creates copies and puts them back. Recognizes already persisted Objects and checks them for changes as well. - * - * @param */ public class RecursiveWorkingCopier implements WorkingCopier { diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/reposyncer/RepositorySynchronizer.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/reposyncer/RepositorySynchronizer.java index b7b12836..b071aae5 100644 --- a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/reposyncer/RepositorySynchronizer.java +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/reposyncer/RepositorySynchronizer.java @@ -21,8 +21,8 @@ /** - * Since EclipseStore is not table-oriented, but the access through the repositories is, we must keep the lists/tables of - * entities in sync with the existing entities in the graph. + * Since EclipseStore is not table-oriented, but the access through the repositories is, we must keep the lists/tables + * of entities in sync with the existing entities in the graph. *

* With every store we must check, if there is a new entity in the graph, that isn't yet in the entity-list. */ diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/util/GenericObjectComparer.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/util/GenericObjectComparer.java index 89d624ae..22bf49b3 100644 --- a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/util/GenericObjectComparer.java +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/util/GenericObjectComparer.java @@ -18,11 +18,10 @@ import software.xdev.spring.data.eclipse.store.exceptions.NotComparableException; -public class GenericObjectComparer +public final class GenericObjectComparer { private GenericObjectComparer() { - // Only static methods } public static int compare(final E o1, final E o2) diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/util/StringUtil.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/util/StringUtil.java index 341146f0..d79f240b 100644 --- a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/util/StringUtil.java +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/util/StringUtil.java @@ -20,11 +20,10 @@ import software.xdev.spring.data.eclipse.store.exceptions.StringBlankException; -public class StringUtil +public final class StringUtil { private StringUtil() { - // Only static methods } @SuppressWarnings("UnusedReturnValue") diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/helper/TestData.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/helper/TestData.java index 67e7c59a..e5482b6d 100644 --- a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/helper/TestData.java +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/helper/TestData.java @@ -15,10 +15,14 @@ */ package software.xdev.spring.data.eclipse.store.helper; -public class TestData +public final class TestData { public static final String LAST_NAME = "Fleetwood"; public static final String FIRST_NAME = "Mick"; public static final String LAST_NAME_ALTERNATIVE = "Nicks"; public static final String FIRST_NAME_ALTERNATIVE = "Stevie"; + + private TestData() + { + } } diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/helper/TestUtil.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/helper/TestUtil.java index 91670885..98cb7550 100644 --- a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/helper/TestUtil.java +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/helper/TestUtil.java @@ -23,7 +23,7 @@ import software.xdev.spring.data.eclipse.store.repository.EclipseStoreStorage; -public class TestUtil +public final class TestUtil { public static List iterableToList(final Iterable iterable) { @@ -40,8 +40,7 @@ public static void restartDatastore(final EclipseStoreStorage storage) public static void doBeforeAndAfterRestartOfDatastore( final EclipseStoreStorage storage, - final Runnable thingToDoBeforeAndAfterRestart - ) + final Runnable thingToDoBeforeAndAfterRestart) { try { @@ -61,4 +60,8 @@ public static void doBeforeAndAfterRestartOfDatastore( throw new AssertionFailedError("Error after restart of storage", error); } } + + private TestUtil() + { + } } diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/Node.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/Node.java index a005fda9..e75f8e52 100644 --- a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/Node.java +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/Node.java @@ -55,10 +55,10 @@ public List getChildren() @Override public String toString() { - return "Node{" + - "name='" + this.name + '\'' + - ", children=" + this.children.size() + - '}'; + return "Node{" + + "name='" + this.name + '\'' + + ", children=" + this.children.size() + + '}'; } public static Optional getNodeWithName(final List nodes, final String name) diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/JpaCompatibilityTest.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/JpaCompatibilityTest.java index 0907a17c..239831b3 100644 --- a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/JpaCompatibilityTest.java +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/JpaCompatibilityTest.java @@ -18,10 +18,11 @@ import java.util.List; import java.util.Optional; +import jakarta.inject.Inject; + import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import jakarta.inject.Inject; import software.xdev.spring.data.eclipse.store.helper.TestData; import software.xdev.spring.data.eclipse.store.helper.TestUtil; import software.xdev.spring.data.eclipse.store.integration.DefaultTestAnnotations; @@ -65,7 +66,8 @@ void testUseQueryAnnotationFindByFirstName() TestUtil.doBeforeAndAfterRestartOfDatastore( this.storage, () -> { - final Optional foundCustomer = this.customerRepository.findByFirstName(TestData.FIRST_NAME); + final Optional foundCustomer = + this.customerRepository.findByFirstName(TestData.FIRST_NAME); Assertions.assertTrue(foundCustomer.isPresent()); Assertions.assertEquals(customer1, foundCustomer.get()); Assertions.assertNotSame(customer1, foundCustomer.get()); @@ -82,7 +84,8 @@ void testUseQueryAnnotationFindAllByLastName() TestUtil.doBeforeAndAfterRestartOfDatastore( this.storage, () -> { - final List customers = TestUtil.iterableToList(this.customerRepository.findAllByLastName(TestData.LAST_NAME)); + final List customers = + TestUtil.iterableToList(this.customerRepository.findAllByLastName(TestData.LAST_NAME)); Assertions.assertEquals(1, customers.size()); Assertions.assertEquals(customer1, customers.get(0)); Assertions.assertNotSame(customer1, customers.get(0)); diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/QueryTest.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/QueryTest.java index 6a6a90fc..f7c7a902 100644 --- a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/QueryTest.java +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/QueryTest.java @@ -18,13 +18,14 @@ import java.util.List; import java.util.Optional; +import jakarta.inject.Inject; + import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort; -import jakarta.inject.Inject; import software.xdev.spring.data.eclipse.store.helper.TestData; import software.xdev.spring.data.eclipse.store.helper.TestUtil; import software.xdev.spring.data.eclipse.store.integration.DefaultTestAnnotations; @@ -116,10 +117,12 @@ void testPageableFindAllTwoPages() this.storage, () -> { final Pageable pageable = PageRequest.of(0, 1); - final List customersPage1 = TestUtil.iterableToList(this.customerRepository.findAll(pageable)); + final List customersPage1 = + TestUtil.iterableToList(this.customerRepository.findAll(pageable)); Assertions.assertEquals(1, customersPage1.size()); - final List customersPage2 = TestUtil.iterableToList(this.customerRepository.findAll(pageable.next())); + final List customersPage2 = + TestUtil.iterableToList(this.customerRepository.findAll(pageable.next())); Assertions.assertEquals(1, customersPage2.size()); Assertions.assertNotEquals(customersPage1.get(0), customersPage2.get(0)); @@ -158,7 +161,8 @@ void testPageableFindAllOnePage() this.storage, () -> { final Pageable pageable = PageRequest.of(0, 2); - final List customersPage1 = TestUtil.iterableToList(this.customerRepository.findAll(pageable)); + final List customersPage1 = + TestUtil.iterableToList(this.customerRepository.findAll(pageable)); Assertions.assertEquals(2, customersPage1.size()); Assertions.assertEquals( customer1, diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/EclipseStoreQueryCreatorGreaterLessTest.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/EclipseStoreQueryCreatorGreaterLessTest.java index ca454a97..652c21fe 100644 --- a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/EclipseStoreQueryCreatorGreaterLessTest.java +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/EclipseStoreQueryCreatorGreaterLessTest.java @@ -259,7 +259,8 @@ private interface CustomerRepository extends Repository findByFirstNameLessThan(final String maxStringExcluding); - List findByIncomparableLessThan(final QueryCreatorUtil.Incomparable lessIncomparable); + List findByIncomparableLessThan( + final QueryCreatorUtil.Incomparable lessIncomparable); List findByIdBetween(final int minIdIncluding, final int maxIdIncluding); } diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/EclipseStoreQueryCreatorIsIsNotTest.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/EclipseStoreQueryCreatorIsIsNotTest.java index 68a42e05..7b8ae212 100644 --- a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/EclipseStoreQueryCreatorIsIsNotTest.java +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/EclipseStoreQueryCreatorIsIsNotTest.java @@ -50,7 +50,11 @@ void findByFirstName(final Collection entities, final { final Method method = CustomerRepository.class.getMethod("findByFirstName", String.class); final Collection foundCustomer = - QueryCreatorUtil.executeQuery(entities, QueryCreatorUtil.Customer.class, method, new Object[]{TestData.FIRST_NAME}); + QueryCreatorUtil.executeQuery( + entities, + QueryCreatorUtil.Customer.class, + method, + new Object[]{TestData.FIRST_NAME}); Assertions.assertEquals(expectedCount, foundCustomer.size()); } diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/QueryCreatorUtil.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/QueryCreatorUtil.java index c0351394..4d365471 100644 --- a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/QueryCreatorUtil.java +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/QueryCreatorUtil.java @@ -31,32 +31,31 @@ import software.xdev.spring.data.eclipse.store.helper.TestData; -public class QueryCreatorUtil +public final class QueryCreatorUtil { - - public final static Collection DATA_CUSTOMERS_EMPTY = + public static final Collection DATA_CUSTOMERS_EMPTY = new ArrayList<>(); - public final static Collection DATA_CUSTOMERS_ONE = + public static final Collection DATA_CUSTOMERS_ONE = List.of(new Customer(1, TestData.FIRST_NAME, TestData.LAST_NAME, new Incomparable(""), true)); - public final static Collection DATA_CUSTOMERS_TWO = List.of( + public static final Collection DATA_CUSTOMERS_TWO = List.of( new Customer(1, TestData.FIRST_NAME, TestData.LAST_NAME, new Incomparable(""), true), new Customer( 2, TestData.FIRST_NAME_ALTERNATIVE, TestData.LAST_NAME_ALTERNATIVE, new Incomparable(""), false)); - public final static Collection DATA_CUSTOMERS_THREE = List.of( + public static final Collection DATA_CUSTOMERS_THREE = List.of( new Customer(1, TestData.FIRST_NAME, TestData.LAST_NAME, new Incomparable(""), true), new Customer( 2, TestData.FIRST_NAME_ALTERNATIVE, TestData.LAST_NAME_ALTERNATIVE, new Incomparable(""), false), new Customer(3, TestData.FIRST_NAME, TestData.LAST_NAME_ALTERNATIVE, null, false)); - public final static Collection DATA_CUSTOMERS_DABC_ABCD = List.of( + public static final Collection DATA_CUSTOMERS_DABC_ABCD = List.of( new Customer(1, "D", "A", new Incomparable(""), true), new Customer(2, "A", "B", new Incomparable(""), false), new Customer(3, "B", "C", new Incomparable(""), true), new Customer(4, "C", "D", null, false)); - public final static Collection DATA_CUSTOMERS_WITH_NULL_STRING = List.of( + public static final Collection DATA_CUSTOMERS_WITH_NULL_STRING = List.of( new Customer(1, TestData.FIRST_NAME, TestData.LAST_NAME, new Incomparable(""), true), new Customer(2, null, TestData.LAST_NAME_ALTERNATIVE, new Incomparable(""), false), new Customer(3, TestData.FIRST_NAME_ALTERNATIVE, null, new Incomparable(""), true), @@ -92,4 +91,8 @@ public record Customer(int id, String firstName, String lastName, Incomparable i public record Incomparable(String value) { } + + private QueryCreatorUtil() + { + } } diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/executors/PageableSortableCollectionQuerierTest.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/executors/PageableSortableCollectionQuerierTest.java index 97265e63..9e8d6ebb 100644 --- a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/executors/PageableSortableCollectionQuerierTest.java +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/query/executors/PageableSortableCollectionQuerierTest.java @@ -36,15 +36,16 @@ import software.xdev.spring.data.eclipse.store.repository.query.criteria.CriteriaSingleNode; +@SuppressWarnings("checkstyle:MethodName") class PageableSortableCollectionQuerierTest { - private final static Field customerFirstNameField; + private static final Field CUSTOMER_FIRST_NAME_FIELD; static { try { - customerFirstNameField = Customer.class.getDeclaredField("firstName"); + CUSTOMER_FIRST_NAME_FIELD = Customer.class.getDeclaredField("firstName"); } catch(final NoSuchFieldException e) { @@ -52,17 +53,17 @@ class PageableSortableCollectionQuerierTest } } - private final static Collection DATA_CUSTOMERS_EMPTY = new ArrayList<>(); - private final static Collection DATA_CUSTOMERS_ONE = + private static final Collection DATA_CUSTOMERS_EMPTY = new ArrayList<>(); + private static final Collection DATA_CUSTOMERS_ONE = List.of(new Customer(TestData.FIRST_NAME, TestData.LAST_NAME)); - private final static Collection DATA_CUSTOMERS_TWO = List.of( + private static final Collection DATA_CUSTOMERS_TWO = List.of( new Customer(TestData.FIRST_NAME, TestData.LAST_NAME), new Customer(TestData.FIRST_NAME_ALTERNATIVE, TestData.LAST_NAME_ALTERNATIVE)); - private final static Collection DATA_CUSTOMERS_THREE = List.of( + private static final Collection DATA_CUSTOMERS_THREE = List.of( new Customer(TestData.FIRST_NAME, TestData.LAST_NAME), new Customer(TestData.FIRST_NAME_ALTERNATIVE, TestData.LAST_NAME_ALTERNATIVE), new Customer(TestData.FIRST_NAME, TestData.LAST_NAME)); - private final static Collection DATA_CUSTOMERS_DABC_ABCD = List.of( + private static final Collection DATA_CUSTOMERS_DABC_ABCD = List.of( new Customer("D", "A"), new Customer("A", "B"), new Customer("B", "C"), @@ -199,7 +200,8 @@ void getEntities_CriteriaFirstName_NoPageable_NoSortable( { final PageableSortableCollectionQuerier querier = new PageableSortableCollectionQuerier<>( new DummyWorkingCopier<>(), - new CriteriaSingleNode<>(new ReflectedField(customerFirstNameField)).is(TestData.FIRST_NAME) + new CriteriaSingleNode<>( + new ReflectedField(CUSTOMER_FIRST_NAME_FIELD)).is(TestData.FIRST_NAME) ); Assertions.assertEquals(countOfEntitiesWithFirstName, querier.getEntities(entities, Customer.class).size()); } diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/support/copier/object/MicroStreamRegisteringCopierTest.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/support/copier/object/MicroStreamRegisteringCopierTest.java index 1c29302f..9cbd8cad 100644 --- a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/support/copier/object/MicroStreamRegisteringCopierTest.java +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/support/copier/object/MicroStreamRegisteringCopierTest.java @@ -16,7 +16,6 @@ package software.xdev.spring.data.eclipse.store.repository.support.copier.object; import java.util.List; -import java.util.Objects; import java.util.stream.IntStream; import org.junit.jupiter.api.Assertions; @@ -27,37 +26,8 @@ class EclipseStoreRegisteringCopierTest { - static private class DummyData + private record DummyData(String data, int number) { - private final String data; - private final int number; - - public DummyData(final String data, final int number) - { - this.data = data; - this.number = number; - } - - @Override - public boolean equals(final Object o) - { - if(this == o) - { - return true; - } - if(o == null || this.getClass() != o.getClass()) - { - return false; - } - final DummyData dummyData = (DummyData)o; - return this.number == dummyData.number && Objects.equals(this.data, dummyData.data); - } - - @Override - public int hashCode() - { - return Objects.hash(this.data, this.number); - } } @Test From dc62f5aac280a63e3b0597d82cd8276265665553 Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 23 Jan 2024 11:08:59 +0100 Subject: [PATCH 07/40] Improve deprecation Co-Authored-By: Johannes Rabauer <8188460+JohannesRabauer@users.noreply.github.com> --- .../EclipseStoreRepositoryConfigurationExtension.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/config/EclipseStoreRepositoryConfigurationExtension.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/config/EclipseStoreRepositoryConfigurationExtension.java index 6e55ffd3..854a0956 100644 --- a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/config/EclipseStoreRepositoryConfigurationExtension.java +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/config/EclipseStoreRepositoryConfigurationExtension.java @@ -19,10 +19,11 @@ import java.util.Collection; import java.util.Collections; +import jakarta.annotation.Nonnull; + import org.springframework.data.repository.config.RepositoryConfigurationExtension; import org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport; -import jakarta.annotation.Nonnull; import software.xdev.spring.data.eclipse.store.repository.EclipseStoreRepository; import software.xdev.spring.data.eclipse.store.repository.support.EclipseStoreRepositoryFactoryBean; @@ -39,11 +40,14 @@ public String getModuleName() return "EclipseStoreDatastore"; } + /** + * {@inheritDoc} + */ @Override @Nonnull public String getModulePrefix() { - return "EclipseStore"; + return this.getModuleIdentifier(); } @Override @@ -57,7 +61,7 @@ public String getRepositoryFactoryBeanClassName() @Nonnull public String getModuleIdentifier() { - return this.getModulePrefix(); + return "EclipseStore"; } @Override From 2d7b628265e032463f1c3fd148171497a5700e92 Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 23 Jan 2024 11:19:32 +0100 Subject: [PATCH 08/40] Add benchmark Co-Authored-By: Johannes Rabauer <8188460+JohannesRabauer@users.noreply.github.com> --- pom.xml | 1 + .../.gitignore | 38 +++++++ spring-data-eclipse-store-benchmark/pom.xml | 107 ++++++++++++++++++ .../store/benchmark/BenchmarkApplication.java | 31 +++++ .../store/benchmark/BenchmarkRunner.java | 35 ++++++ .../eclipse/store/benchmark/SpringState.java | 59 ++++++++++ .../benchmarks/simple/customer/Customer.java | 37 ++++++ .../simple/customer/CustomerRepository.java | 23 ++++ .../LoadingSimpleCustomerBenchmark.java | 105 +++++++++++++++++ .../StoringSimpleCustomerBenchmark.java | 79 +++++++++++++ .../with/id/CustomerWithAutoId.java | 46 ++++++++ .../with/id/CustomerWithAutoIdRepository.java | 23 ++++ .../StoringCustomerWithAutoIdBenchmark.java | 63 +++++++++++ 13 files changed, 647 insertions(+) create mode 100644 spring-data-eclipse-store-benchmark/.gitignore create mode 100644 spring-data-eclipse-store-benchmark/pom.xml create mode 100644 spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/BenchmarkApplication.java create mode 100644 spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/BenchmarkRunner.java create mode 100644 spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/SpringState.java create mode 100644 spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/benchmarks/simple/customer/Customer.java create mode 100644 spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/benchmarks/simple/customer/CustomerRepository.java create mode 100644 spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/benchmarks/simple/customer/LoadingSimpleCustomerBenchmark.java create mode 100644 spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/benchmarks/simple/customer/StoringSimpleCustomerBenchmark.java create mode 100644 spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/benchmarks/with/id/CustomerWithAutoId.java create mode 100644 spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/benchmarks/with/id/CustomerWithAutoIdRepository.java create mode 100644 spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/benchmarks/with/id/StoringCustomerWithAutoIdBenchmark.java diff --git a/pom.xml b/pom.xml index 310781ec..f95bbbfc 100644 --- a/pom.xml +++ b/pom.xml @@ -17,6 +17,7 @@ spring-data-eclipse-store spring-data-eclipse-store-demo + spring-data-eclipse-store-benchmark diff --git a/spring-data-eclipse-store-benchmark/.gitignore b/spring-data-eclipse-store-benchmark/.gitignore new file mode 100644 index 00000000..5ff6309b --- /dev/null +++ b/spring-data-eclipse-store-benchmark/.gitignore @@ -0,0 +1,38 @@ +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### IntelliJ IDEA ### +.idea/modules.xml +.idea/jarRepositories.xml +.idea/compiler.xml +.idea/libraries/ +*.iws +*.iml +*.ipr + +### Eclipse ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ + +### Mac OS ### +.DS_Store \ No newline at end of file diff --git a/spring-data-eclipse-store-benchmark/pom.xml b/spring-data-eclipse-store-benchmark/pom.xml new file mode 100644 index 00000000..bdb3618e --- /dev/null +++ b/spring-data-eclipse-store-benchmark/pom.xml @@ -0,0 +1,107 @@ + + 4.0.0 + + com.xdev-software + spring-data-eclipse-store-benchmark + 1.0.0-SNAPSHOT + jar + + 2023 + + + XDEV Software + https://xdev.software + + + + 17 + ${javaVersion} + UTF-8 + UTF-8 + + 3.2.2 + 1.37 + + + + + software.xdev + spring-data-eclipse-store + ${project.version} + + + + org.springframework.boot + spring-boot + ${spring-boot.version} + + + org.springframework.boot + spring-boot-starter + ${spring-boot.version} + + + + org.openjdk.jmh + jmh-core + ${jmh.version} + + + org.openjdk.jmh + jmh-generator-annprocess + ${jmh.version} + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.12.1 + + ${maven.compiler.release} + + + org.openjdk.jmh + jmh-generator-annprocess + ${jmh.version} + + + + + + + + + checkstyle + + + + org.apache.maven.plugins + maven-checkstyle-plugin + 3.3.1 + + + com.puppycrawl.tools + checkstyle + 10.12.7 + + + + ../.config/checkstyle/checkstyle.xml + + + + + check + + + + + + + + + diff --git a/spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/BenchmarkApplication.java b/spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/BenchmarkApplication.java new file mode 100644 index 00000000..2a31ef8b --- /dev/null +++ b/spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/BenchmarkApplication.java @@ -0,0 +1,31 @@ +package software.xdev.spring.data.eclipse.store.benchmark; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.ConfigurableApplicationContext; + +import software.xdev.spring.data.eclipse.store.repository.config.EnableEclipseStoreRepositories; + + +@SuppressWarnings("checkstyle:HideUtilityClassConstructor") +@SpringBootApplication +@EnableEclipseStoreRepositories +public class BenchmarkApplication +{ + private static final Logger LOG = LoggerFactory.getLogger(BenchmarkApplication.class); + + public static void main(final String[] args) + { + try + { + final ConfigurableApplicationContext run = SpringApplication.run(BenchmarkRunner.class, args); + run.close(); + } + catch(final Exception e) + { + LOG.error("Error starting the benchmark", e); + } + } +} diff --git a/spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/BenchmarkRunner.java b/spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/BenchmarkRunner.java new file mode 100644 index 00000000..b3896aa8 --- /dev/null +++ b/spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/BenchmarkRunner.java @@ -0,0 +1,35 @@ +package software.xdev.spring.data.eclipse.store.benchmark; + +import java.util.concurrent.TimeUnit; + +import org.openjdk.jmh.annotations.Mode; +import org.openjdk.jmh.runner.Runner; +import org.openjdk.jmh.runner.RunnerException; +import org.openjdk.jmh.runner.options.Options; +import org.openjdk.jmh.runner.options.OptionsBuilder; +import org.openjdk.jmh.runner.options.TimeValue; + + +public final class BenchmarkRunner +{ + private BenchmarkRunner() + { + } + + @SuppressWarnings("checkstyle:MagicNumber") + public static void main(final String[] args) throws RunnerException + { + final Options opt = new OptionsBuilder() + .mode(Mode.AverageTime) + .forks(1) + .warmupTime(TimeValue.seconds(1)) + .warmupIterations(8) + .measurementTime(TimeValue.seconds(1)) + .measurementIterations(10) + .timeUnit(TimeUnit.MILLISECONDS) + .build(); + + new Runner(opt).run(); + } +} + diff --git a/spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/SpringState.java b/spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/SpringState.java new file mode 100644 index 00000000..e2c73c35 --- /dev/null +++ b/spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/SpringState.java @@ -0,0 +1,59 @@ +package software.xdev.spring.data.eclipse.store.benchmark; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; + +import org.openjdk.jmh.annotations.Level; +import org.openjdk.jmh.annotations.Scope; +import org.openjdk.jmh.annotations.Setup; +import org.openjdk.jmh.annotations.State; +import org.openjdk.jmh.annotations.TearDown; +import org.springframework.boot.SpringApplication; +import org.springframework.context.ConfigurableApplicationContext; +import org.springframework.util.FileSystemUtils; + +import software.xdev.spring.data.eclipse.store.repository.EclipseStoreStorage; + + +@State(Scope.Thread) +public class SpringState +{ + private ConfigurableApplicationContext context; + private Path tempStorageDirectory; + + @Setup(Level.Trial) + public void doSetup() throws IOException + { + this.tempStorageDirectory = Files.createTempDirectory("tempstorage"); + this.context = SpringApplication.run( + BenchmarkApplication.class, + "--org.eclipse.store.storage-directory=" + this.tempStorageDirectory.toAbsolutePath()); + } + + @Setup(Level.Invocation) + public void doSetupData() + { + this.context.getBean(EclipseStoreStorage.class).clearData(); + } + + @TearDown(Level.Invocation) + public void doTearDownData() + { + this.context.getBean(EclipseStoreStorage.class).clearData(); + } + + @TearDown(Level.Trial) + public void doTearDown() throws IOException + { + SpringApplication.exit(this.context); + this.context.close(); + this.context = null; + FileSystemUtils.deleteRecursively(this.tempStorageDirectory); + } + + public T getBean(final Class classOfBeanToGet) + { + return this.context.getBean(classOfBeanToGet); + } +} diff --git a/spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/benchmarks/simple/customer/Customer.java b/spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/benchmarks/simple/customer/Customer.java new file mode 100644 index 00000000..9e3dad3a --- /dev/null +++ b/spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/benchmarks/simple/customer/Customer.java @@ -0,0 +1,37 @@ +/* + * Copyright © 2023 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.benchmark.benchmarks.simple.customer; + +public class Customer +{ + private final String firstName; + private final String lastName; + + public Customer(final String firstName, final String lastName) + { + this.firstName = firstName; + this.lastName = lastName; + } + + @Override + public String toString() + { + return "Customer{" + + "firstName='" + this.firstName + '\'' + + ", lastName='" + this.lastName + '\'' + + '}'; + } +} diff --git a/spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/benchmarks/simple/customer/CustomerRepository.java b/spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/benchmarks/simple/customer/CustomerRepository.java new file mode 100644 index 00000000..95d133aa --- /dev/null +++ b/spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/benchmarks/simple/customer/CustomerRepository.java @@ -0,0 +1,23 @@ +/* + * Copyright © 2023 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.benchmark.benchmarks.simple.customer; + +import org.springframework.data.repository.CrudRepository; + + +public interface CustomerRepository extends CrudRepository +{ +} diff --git a/spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/benchmarks/simple/customer/LoadingSimpleCustomerBenchmark.java b/spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/benchmarks/simple/customer/LoadingSimpleCustomerBenchmark.java new file mode 100644 index 00000000..7129a361 --- /dev/null +++ b/spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/benchmarks/simple/customer/LoadingSimpleCustomerBenchmark.java @@ -0,0 +1,105 @@ +package software.xdev.spring.data.eclipse.store.benchmark.benchmarks.simple.customer; + +import java.util.stream.IntStream; + +import org.openjdk.jmh.annotations.Benchmark; +import org.openjdk.jmh.annotations.Level; +import org.openjdk.jmh.annotations.Setup; +import org.openjdk.jmh.infra.Blackhole; + +import software.xdev.spring.data.eclipse.store.benchmark.SpringState; +import software.xdev.spring.data.eclipse.store.repository.EclipseStoreStorage; + + +public class LoadingSimpleCustomerBenchmark +{ + public abstract static class ExistingCustomerSpringState extends SpringState + { + private final int entityCount; + + protected ExistingCustomerSpringState(final int entityCount) + { + this.entityCount = entityCount; + } + + @Override + @Setup(Level.Invocation) + public void doSetupData() + { + this.getBean(EclipseStoreStorage.class).clearData(); + this.getBean(CustomerRepository.class).saveAll( + IntStream.range(0, this.entityCount).mapToObj( + i -> new Customer("Test" + i, "Test" + i) + ).toList() + ); + this.getBean(EclipseStoreStorage.class).stop(); + } + } + + + public static class SimpleSingleCustomerSpringState extends SpringState + { + @Override + @Setup(Level.Invocation) + public void doSetupData() + { + this.getBean(EclipseStoreStorage.class).clearData(); + this.getBean(CustomerRepository.class).save(new Customer("Test", "Test")); + this.getBean(EclipseStoreStorage.class).stop(); + } + } + + @Benchmark + public void loadSingleCustomer(final SimpleSingleCustomerSpringState state, final Blackhole blackhole) + { + final CustomerRepository customerRepository = state.getBean(CustomerRepository.class); + blackhole.consume(customerRepository.findAll()); + } + + public static class Simple100CustomerSpringState extends ExistingCustomerSpringState + { + public Simple100CustomerSpringState() + { + super(100); + } + } + + @Benchmark + public void load100Customers(final Simple100CustomerSpringState state, final Blackhole blackhole) + { + final CustomerRepository customerRepository = state.getBean(CustomerRepository.class); + blackhole.consume(customerRepository.findAll()); + } + + public static class Simple1000CustomerSpringState extends ExistingCustomerSpringState + { + public Simple1000CustomerSpringState() + { + super(1_000); + } + } + + @Benchmark + public void load1000Customers(final Simple1000CustomerSpringState state, final Blackhole blackhole) + { + final CustomerRepository customerRepository = state.getBean(CustomerRepository.class); + blackhole.consume(customerRepository.findAll()); + } + + public static class Simple10000CustomerSpringState extends ExistingCustomerSpringState + { + @SuppressWarnings("checkstyle:MagicNumber") + public Simple10000CustomerSpringState() + { + super(10_000); + } + } + + @Benchmark + // Disabled because this is not working right now. + public void load10000Customers(final Simple10000CustomerSpringState state, final Blackhole blackhole) + { + final CustomerRepository customerRepository = state.getBean(CustomerRepository.class); + blackhole.consume(customerRepository.findAll()); + } +} diff --git a/spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/benchmarks/simple/customer/StoringSimpleCustomerBenchmark.java b/spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/benchmarks/simple/customer/StoringSimpleCustomerBenchmark.java new file mode 100644 index 00000000..9b9f923f --- /dev/null +++ b/spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/benchmarks/simple/customer/StoringSimpleCustomerBenchmark.java @@ -0,0 +1,79 @@ +package software.xdev.spring.data.eclipse.store.benchmark.benchmarks.simple.customer; + +import java.util.stream.IntStream; + +import org.openjdk.jmh.annotations.Benchmark; + +import software.xdev.spring.data.eclipse.store.benchmark.SpringState; + + +@SuppressWarnings("checkstyle:MagicNumber") +public class StoringSimpleCustomerBenchmark +{ + @Benchmark + public void saveSingleCustomer(final SpringState state) + { + final CustomerRepository customerRepository = state.getBean(CustomerRepository.class); + customerRepository.save(new Customer("Test", "Test")); + } + + @Benchmark + public void save100CustomerInForEach(final SpringState state) + { + this.saveCustomerInForEach(state, 100); + } + + @Benchmark + public void save100CustomerInSaveAll(final SpringState state) + { + this.saveCustomerInSaveAll(state, 100); + } + + @Benchmark + public void save1000CustomerInSaveAll(final SpringState state) + { + this.saveCustomerInSaveAll(state, 1_000); + } + + @Benchmark + public void save10000CustomerInSaveAll(final SpringState state) + { + this.saveCustomerInSaveAll(state, 10_000); + } + + @Benchmark + public void save1000CustomerInForEach(final SpringState state) + { + this.saveCustomerInForEach(state, 1_000); + } + + @Benchmark + public void save10000CustomerInForEach(final SpringState state) + { + this.saveCustomerInForEach(state, 10_000); + } + + @Benchmark + public void save100000CustomerInSaveAll(final SpringState state) + { + this.saveCustomerInSaveAll(state, 100_000); + } + + private void saveCustomerInForEach(final SpringState state, final int entityCount) + { + final CustomerRepository customerRepository = state.getBean(CustomerRepository.class); + IntStream.range(0, entityCount).forEach( + i -> customerRepository.save(new Customer("Test" + i, "Test" + i)) + ); + } + + private void saveCustomerInSaveAll(final SpringState state, final int entityCount) + { + final CustomerRepository customerRepository = state.getBean(CustomerRepository.class); + customerRepository.saveAll( + IntStream.range(0, entityCount).mapToObj( + i -> new Customer("Test" + i, "Test" + i) + ).toList() + ); + } +} diff --git a/spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/benchmarks/with/id/CustomerWithAutoId.java b/spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/benchmarks/with/id/CustomerWithAutoId.java new file mode 100644 index 00000000..012e7f10 --- /dev/null +++ b/spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/benchmarks/with/id/CustomerWithAutoId.java @@ -0,0 +1,46 @@ +/* + * Copyright © 2023 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.benchmark.benchmarks.with.id; + +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; + + +public class CustomerWithAutoId +{ + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private int id; + private final String firstName; + private final String lastName; + + public CustomerWithAutoId(final String firstName, final String lastName) + { + this.firstName = firstName; + this.lastName = lastName; + } + + @Override + public String toString() + { + return "CustomerWithAutoId{" + + "id=" + this.id + + ", firstName='" + this.firstName + '\'' + + ", lastName='" + this.lastName + '\'' + + '}'; + } +} diff --git a/spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/benchmarks/with/id/CustomerWithAutoIdRepository.java b/spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/benchmarks/with/id/CustomerWithAutoIdRepository.java new file mode 100644 index 00000000..cc6d3276 --- /dev/null +++ b/spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/benchmarks/with/id/CustomerWithAutoIdRepository.java @@ -0,0 +1,23 @@ +/* + * Copyright © 2023 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.benchmark.benchmarks.with.id; + +import org.springframework.data.repository.CrudRepository; + + +public interface CustomerWithAutoIdRepository extends CrudRepository +{ +} diff --git a/spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/benchmarks/with/id/StoringCustomerWithAutoIdBenchmark.java b/spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/benchmarks/with/id/StoringCustomerWithAutoIdBenchmark.java new file mode 100644 index 00000000..515c3093 --- /dev/null +++ b/spring-data-eclipse-store-benchmark/src/main/java/software/xdev/spring/data/eclipse/store/benchmark/benchmarks/with/id/StoringCustomerWithAutoIdBenchmark.java @@ -0,0 +1,63 @@ +package software.xdev.spring.data.eclipse.store.benchmark.benchmarks.with.id; + +import java.util.stream.IntStream; + +import org.openjdk.jmh.annotations.Benchmark; + +import software.xdev.spring.data.eclipse.store.benchmark.SpringState; + + +public class StoringCustomerWithAutoIdBenchmark +{ + @Benchmark + public void saveSingleCustomerWithAutoId(final SpringState state) + { + final CustomerWithAutoIdRepository customerRepository = + state.getBean(CustomerWithAutoIdRepository.class); + customerRepository.save(new CustomerWithAutoId("Test", "Test")); + } + + @Benchmark + public void save100CustomerInForEach(final SpringState state) + { + final CustomerWithAutoIdRepository customerRepository = + state.getBean(CustomerWithAutoIdRepository.class); + IntStream.range(0, 100).forEach( + i -> customerRepository.save(new CustomerWithAutoId("Test" + i, "Test" + i)) + ); + } + + @Benchmark + public void save100CustomerInSaveAll(final SpringState state) + { + final CustomerWithAutoIdRepository customerRepository = + state.getBean(CustomerWithAutoIdRepository.class); + customerRepository.saveAll( + IntStream.range(0, 100).mapToObj( + i -> new CustomerWithAutoId("Test" + i, "Test" + i) + ).toList() + ); + } + + @Benchmark + public void save1000CustomerInForEach(final SpringState state) + { + final CustomerWithAutoIdRepository customerRepository = + state.getBean(CustomerWithAutoIdRepository.class); + IntStream.range(0, 1000).forEach( + i -> customerRepository.save(new CustomerWithAutoId("Test" + i, "Test" + i)) + ); + } + + @Benchmark + public void save1000CustomerInSaveAll(final SpringState state) + { + final CustomerWithAutoIdRepository customerRepository = + state.getBean(CustomerWithAutoIdRepository.class); + customerRepository.saveAll( + IntStream.range(0, 1000).mapToObj( + i -> new CustomerWithAutoId("Test" + i, "Test" + i) + ).toList() + ); + } +} From 64a2149c18fa40a15a573038376036e743bc56cd Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 23 Jan 2024 11:19:37 +0100 Subject: [PATCH 09/40] Update .gitignore Co-Authored-By: Johannes Rabauer <8188460+JohannesRabauer@users.noreply.github.com> --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index d0e81bf1..d9fcfd84 100644 --- a/.gitignore +++ b/.gitignore @@ -66,6 +66,9 @@ target/ .flattened-pom.xml .tern-project +# EclipseStore +storage + # == IntelliJ == *.iml *.ipr From 435111646038c7c82ea06002a8330c2f38520761 Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 23 Jan 2024 11:19:44 +0100 Subject: [PATCH 10/40] Add run configurations Co-Authored-By: Johannes Rabauer <8188460+JohannesRabauer@users.noreply.github.com> --- .run/Run Benchmark.run.xml | 16 ++++++++++++++++ .run/Run Complex Demo.run.xml | 17 +++++++++++++++++ ...Run Demo.run.xml => Run Simple Demo.run.xml} | 7 ++++--- 3 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 .run/Run Benchmark.run.xml create mode 100644 .run/Run Complex Demo.run.xml rename .run/{Run Demo.run.xml => Run Simple Demo.run.xml} (54%) diff --git a/.run/Run Benchmark.run.xml b/.run/Run Benchmark.run.xml new file mode 100644 index 00000000..9cd7a859 --- /dev/null +++ b/.run/Run Benchmark.run.xml @@ -0,0 +1,16 @@ + + + + \ No newline at end of file diff --git a/.run/Run Complex Demo.run.xml b/.run/Run Complex Demo.run.xml new file mode 100644 index 00000000..eb0e17a4 --- /dev/null +++ b/.run/Run Complex Demo.run.xml @@ -0,0 +1,17 @@ + + + + \ No newline at end of file diff --git a/.run/Run Demo.run.xml b/.run/Run Simple Demo.run.xml similarity index 54% rename from .run/Run Demo.run.xml rename to .run/Run Simple Demo.run.xml index 8777eeeb..1a784332 100644 --- a/.run/Run Demo.run.xml +++ b/.run/Run Simple Demo.run.xml @@ -1,7 +1,8 @@ - - + \ No newline at end of file From c312e821ec8b3770755f119c16006c32080a1dba Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 23 Jan 2024 11:22:17 +0100 Subject: [PATCH 11/40] Update release.yml Co-Authored-By: Johannes Rabauer <8188460+JohannesRabauer@users.noreply.github.com> --- .github/workflows/release.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e03a52d1..b6f7c9d4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -66,6 +66,10 @@ jobs: run: mvn -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false working-directory: ${{ env.DEMO_MAVEN_MODULE }} + - name: Un-SNAP benchmark + run: mvn -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false + working-directory: spring-data-eclipse-store-benchmark + - name: Un-SNAP run: mvn -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false working-directory: ${{ env.PRIMARY_MAVEN_MODULE }} @@ -212,6 +216,10 @@ jobs: run: mvn -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false -DnextSnapshot=true working-directory: ${{ env.DEMO_MAVEN_MODULE }} + - name: Inc Version and SNAP benchmark + run: mvn -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false -DnextSnapshot=true + working-directory: spring-data-eclipse-store-benchmark + - name: Inc Version and SNAP run: mvn -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false -DnextSnapshot=true working-directory: ${{ env.PRIMARY_MAVEN_MODULE }} From 2173afdf340a43bfc3a314f550b1a336f981c85a Mon Sep 17 00:00:00 2001 From: JohannesRabauer Date: Tue, 23 Jan 2024 12:04:15 +0100 Subject: [PATCH 12/40] Changed README Images to SVG --- README.md | 4 +- assets/Spring-Data-Eclipse-Store-Repo.drawio | 159 +++++++++++++++++++ assets/WorkingCopy_1.png | Bin 42293 -> 0 bytes assets/WorkingCopy_1.svg | 4 + assets/WorkingCopy_2.png | Bin 64344 -> 0 bytes assets/WorkingCopy_2.svg | 4 + 6 files changed, 169 insertions(+), 2 deletions(-) create mode 100644 assets/Spring-Data-Eclipse-Store-Repo.drawio delete mode 100644 assets/WorkingCopy_1.png create mode 100644 assets/WorkingCopy_1.svg delete mode 100644 assets/WorkingCopy_2.png create mode 100644 assets/WorkingCopy_2.svg diff --git a/README.md b/README.md index 1d1e7e0a..8f8210c1 100644 --- a/README.md +++ b/README.md @@ -41,14 +41,14 @@ AWS. ([AWS Pricing Calculator](https://calculator.aws/#/estimate?id=ab85cddf77f0 If you use EclipseStore without our library, EclipseStore loads the data from the datastore directly into memory. You make your changes on these loaded Java objects and by calling ``store`` EclipseStore writes it directly from memory to the datastore. -![Native behavior of EclipseStore](assets/WorkingCopy_1.png) +![Native behavior of EclipseStore](assets/WorkingCopy_1.svg) If you e.g. change the address of a person, the changed address is already in your data model, **even before storing** this person. This is very different from the behavior a Spring user expects. With *Spring-Data-Eclipse-Store* every time an object is loaded from the datastore, a working copy of that object (or rather the object tree) is created and returned to the user. Therefore, the user can make the changes on the working copy without any changes to the actual data model. The changes are only persisted after calling ``save`` on a repository. -![Behavior of EclipseStore with Spring-Data-Eclipse-Store](assets/WorkingCopy_2.png) +![Behavior of EclipseStore with Spring-Data-Eclipse-Store](assets/WorkingCopy_2.svg) ## Installation [Installation guide for the latest release](https://github.com/xdev-software/spring-data-eclipse-store/releases/latest#Installation) diff --git a/assets/Spring-Data-Eclipse-Store-Repo.drawio b/assets/Spring-Data-Eclipse-Store-Repo.drawio new file mode 100644 index 00000000..81f42b74 --- /dev/null +++ b/assets/Spring-Data-Eclipse-Store-Repo.drawio @@ -0,0 +1,159 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/WorkingCopy_1.png b/assets/WorkingCopy_1.png deleted file mode 100644 index a85641bd1211cbf7c6f0e6e6eed92017bafae5f5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 42293 zcmeFYRa9I-*ESdk8X&k^(=-->yITW|OK=SmAV_d`cWEFY!JQyM1HoMa!QI^e3)YI#S732IjDq&htZ)Ssz0D;i{^Ob;zlpX@hf5GDk#lb;BLXZ##z6cN{A?D!! z?Is?Divxz6?ruu_r}@9Vz%M;R0kpxl<*suO~a2)h+FaIAinIZubkqCOK z{_j&Eu-_E_GXzo~0WAm$?im&64X&!Hs&_pgl9ZBy3piU4Fsi;VGBRrHI2Wy1U44H^ zEyku(2@)0&d58RZ;r?pHpTl~Raq76h`Y@23 zKbYRO@XNl>eZ@DNLcl58{dn2hPx%|C^n>s31RATQMxJW({zQ5+m9nJWU8_sV+@t&Z z`_-eP%MUBN!C$X^)0v{jWr4aG$XJ+kO zg%sBBT0c@bak#$}60l~@R2a)DD#qw-K0G{p=2%;Qx;t*$I3E#{g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g+2Hq1D|o?DS?*;vwoR{N40LHIOYP7HbVu(U!1gvK$*e*w>1a4(I~6=L;pCW! z95H*9rph}Iz%JDp^(k&&(yLlGre!}N$C{jlVQ+a@_ta^Qj=BZgFdsNOFTC`Mlx zFpbKSuD4z7u#C$Tmx4&OmWTuM=&Oqt3%DgWIl~(+B1P{_GxSsLWJt=*1n$rVvl2Qi z zRh7H0bn$t0_P zj21jCQ5bdPCg@FyN@y^AjO?14B9|vl?szt1q5t&iP3~WjNK_|YNa1~I|*lh7dD~aB2_ved_ikP*xH7`mLje#8D^gk?>$QR49fU-L_ z`Q7mSFf{eDk~)g2Fj!8lNNr_%cWd1EuDyMdbb?98;GoGA1)#*+ja;2cLLwJM@ZN#l z5ETihFB{UpvfwYO!t|>10u~>=>k_r=haXU~!-PEe?>Z|BrV3iVjx36l_iZ5k z3>CxBL2PUtH=#)r-27%uf;+hqgp(He^nz}bY|F9L?52f>Sp`0-U2Qcv=t_NcegSr0 z(B0HALI%im3+YkYD5Vig5{rcPw%vUNzTxU4MbsVgg1aXrX%vAp$HZP!%G1*NmFiq4 z4%mOrLcMJ^QA*E^=IK!bX>aMvid>E|on~6x>vM&=Ro}n0y#D-FE5h_@m55sf0~&C8 zE;MgX->~xFJV;_r^ybXy`JKSUJb#hjjh0ay0(@|$O2kC^&B=bGq*2HS{%OyEl> zxL6KfJ3+7yc3!ZdK&MAPFh&1d+U{Xgi!`vh90wY&! z)w651`HA(Sa<$FKOaGDjuDlzUz1F@PYZy^-PE*)xWu$1ym+1AdBuVEi)6M-@Op=OL;C z515%`x&-J;J0DMhap9XhahpGW4 + + +
Native behavior of EclipseStore
Native behavior of EclipseStore
EclipseStore
Data
Eclipse...
User
Application
User...
Memory
Memory
Load from
and store to
L...
Load from 
and store to
L...
Java Objects from EclipseStore
Java Objects from EclipseStore
Person
Person
Invoice
Invoice
Warehouse
Warehouse
Text is not SVG - cannot display
\ No newline at end of file diff --git a/assets/WorkingCopy_2.png b/assets/WorkingCopy_2.png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i4z`)^Uk)mtOZhAm(#*m)8H+BTIv_7j7JS%FAu=m&}6@2L0b{7~KN?Go7>K=D+;y m-=fvOSEK&$|Jw9V(JJ^M>oe;>kjc7oMOI2lvgnb~tN#O@U>ddn diff --git a/assets/WorkingCopy_2.svg b/assets/WorkingCopy_2.svg new file mode 100644 index 00000000..8fd645c0 --- /dev/null +++ b/assets/WorkingCopy_2.svg @@ -0,0 +1,4 @@ + + + +
Behavior of EclipseStore with Spring-Data-Eclipse-Store
Behavior of EclipseStore with Spring-Data-Eclipse-Store
EclipseStore
Data
Eclipse...
User
Application
User...
Memory
Memory
Load from
and store to
L...
Load from 
and store to
L...
Data from EclipseStore
Data from EclipseStore
Person
Person
Invoice
Invoice
Warehouse
Warehouse
Working Copy of Data
Working Copy of Data
Load data
and create 
working copy
Load data...
Store data
back to
original data
Store data...
Person
Person
Invoice
Invoice
Warehouse
Warehouse
Text is not SVG - cannot display
\ No newline at end of file From 29aadc08598758d5037d3bf4206c6c72d196c9d2 Mon Sep 17 00:00:00 2001 From: Alex B <45384811+AB-xdev@users.noreply.github.com> Date: Tue, 23 Jan 2024 12:42:48 +0100 Subject: [PATCH 13/40] Update release.yml Get all modules https://github.com/xdev-software/standard-maven-template/issues/20 --- .github/workflows/release.yml | 37 ++++++++++++++++------------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e03a52d1..3eb54088 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,7 +6,6 @@ on: env: PRIMARY_MAVEN_MODULE: ${{ github.event.repository.name }} - DEMO_MAVEN_MODULE: ${{ github.event.repository.name }}-demo permissions: contents: write @@ -58,17 +57,16 @@ jobs: run: | git config --global user.email "actions@github.com" git config --global user.name "GitHub Actions" - - - name: Un-SNAP root - run: mvn -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false - - - name: Un-SNAP demo - run: mvn -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false - working-directory: ${{ env.DEMO_MAVEN_MODULE }} - name: Un-SNAP - run: mvn -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false - working-directory: ${{ env.PRIMARY_MAVEN_MODULE }} + run: | + modules=("") # root + modules+=($(grep -oP '(?<=module>)[^<]+' 'pom.xml')) + for i in "${modules[@]}" + do + echo "Processing $i/pom.xml" + (cd "$i" && mvn -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false) + done - name: Get version id: version @@ -204,17 +202,16 @@ jobs: git config --global user.email "actions@github.com" git config --global user.name "GitHub Actions" git pull - - - name: Inc Version and SNAP root - run: mvn -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false -DnextSnapshot=true - - - name: Inc Version and SNAP demo - run: mvn -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false -DnextSnapshot=true - working-directory: ${{ env.DEMO_MAVEN_MODULE }} - + - name: Inc Version and SNAP - run: mvn -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false -DnextSnapshot=true - working-directory: ${{ env.PRIMARY_MAVEN_MODULE }} + run: | + modules=("") # root + modules+=($(grep -oP '(?<=module>)[^<]+' 'pom.xml')) + for i in "${modules[@]}" + do + echo "Processing $i/pom.xml" + (cd "$i" && mvn -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false -DnextSnapshot=true) + done - name: Git Commit and Push run: | From b899426f15e93eb5c55381e1c3f90cc115c3ce63 Mon Sep 17 00:00:00 2001 From: JohannesRabauer Date: Tue, 23 Jan 2024 12:54:21 +0100 Subject: [PATCH 14/40] Cleaned up dependencies with bom --- spring-data-eclipse-store-benchmark/pom.xml | 16 +++++++++++++--- spring-data-eclipse-store/pom.xml | 18 +++++++++++++----- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/spring-data-eclipse-store-benchmark/pom.xml b/spring-data-eclipse-store-benchmark/pom.xml index bdb3618e..a38fefaf 100644 --- a/spring-data-eclipse-store-benchmark/pom.xml +++ b/spring-data-eclipse-store-benchmark/pom.xml @@ -20,10 +20,22 @@ UTF-8 UTF-8 - 3.2.2 + 3.2.2 1.37 + + + + org.springframework.boot + spring-boot-dependencies + ${org.springframework.boot.version} + pom + import + + + + software.xdev @@ -34,12 +46,10 @@ org.springframework.boot spring-boot - ${spring-boot.version} org.springframework.boot spring-boot-starter - ${spring-boot.version} diff --git a/spring-data-eclipse-store/pom.xml b/spring-data-eclipse-store/pom.xml index 2aff8dfa..b755298d 100644 --- a/spring-data-eclipse-store/pom.xml +++ b/spring-data-eclipse-store/pom.xml @@ -51,7 +51,7 @@ 1.1.0-SNAPSHOT 5.8.1 - 6.1.2 + 6.1.3 3.2.1 3.2.0 @@ -84,9 +84,20 @@ true - + + + + org.springframework + spring-framework-bom + ${spring-bom.version} + pom + import + + + + @@ -108,17 +119,14 @@ org.springframework spring-tx - ${spring-context-beans-tx.version} org.springframework spring-context - ${spring-context-beans-tx.version} org.springframework spring-beans - ${spring-context-beans-tx.version} From 3bb4346aa9740fa9f30a11a3f24bc61336ec16fc Mon Sep 17 00:00:00 2001 From: Alex B <45384811+AB-xdev@users.noreply.github.com> Date: Tue, 23 Jan 2024 12:45:15 +0100 Subject: [PATCH 15/40] Ignore multi lines + fix ``warning: command substitution: ignored null byte in input`` --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3eb54088..534759b2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -61,7 +61,7 @@ jobs: - name: Un-SNAP run: | modules=("") # root - modules+=($(grep -oP '(?<=module>)[^<]+' 'pom.xml')) + modules+=($(grep -ozP '(?<=module>)[^<]+' 'pom.xml' | tr -d '\0')) for i in "${modules[@]}" do echo "Processing $i/pom.xml" @@ -206,7 +206,7 @@ jobs: - name: Inc Version and SNAP run: | modules=("") # root - modules+=($(grep -oP '(?<=module>)[^<]+' 'pom.xml')) + modules+=($(grep -ozP '(?<=module>)[^<]+' 'pom.xml' | tr -d '\0')) for i in "${modules[@]}" do echo "Processing $i/pom.xml" From 8784ee2af02f7da20ff6fa8d4ab3295d3dfd7e70 Mon Sep 17 00:00:00 2001 From: Alex B <45384811+AB-xdev@users.noreply.github.com> Date: Tue, 23 Jan 2024 13:04:23 +0100 Subject: [PATCH 16/40] Use tabs for xml files so that pom.xml files are correct --- .idea/codeStyles/Project.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index 65b8cb49..19681faa 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -90,5 +90,10 @@

+ * Can be used like this because it is {@link AutoCloseable}: + *

+ * + * try(final FieldAccessModifier fem = FieldAccessModifier.makeFieldEditable(field,sourceObject))
{
// Do + * something with the field.
}
+ *
+ *

+ * This is a quite shaky way to make final variables "unfinal". Should work for java versions lower than 18. + *

+ * https://stackoverflow.com/a/56043252/2351407 + */ +@SuppressWarnings("java:S3011") +public class FieldEditableMakerForJavaHigherOrEqualTo18 implements FieldAccessModifierToEditable +{ + private static final Logger LOG = LoggerFactory.getLogger(FieldEditableMakerForJavaHigherOrEqualTo18.class); + private final Field field; + private final Field modifiersField; + private final boolean wasFinal; + private final boolean wasAccessible; + + FieldEditableMakerForJavaHigherOrEqualTo18(final Field field, final E sourceObject) + throws InvocationTargetException, IllegalAccessException + { + this.field = Objects.requireNonNull(field); + + final Method[] classMethods = Class.class.getDeclaredMethods(); + + final Method declaredFieldMethod = Arrays.stream(classMethods) + .filter(x -> Objects.equals(x.getName(), "getDeclaredFields0")) + .findAny() + .orElseThrow(); + + declaredFieldMethod.setAccessible(true); + + final Field[] declaredFieldsOfField = (Field[])declaredFieldMethod.invoke(Field.class, false); + + this.modifiersField = Arrays.stream(declaredFieldsOfField) + .filter(x -> Objects.equals(x.getName(), "modifiers")) + .findAny() + .orElseThrow(); + this.modifiersField.setAccessible(true); + + final int fieldModifiers = field.getModifiers(); + this.wasAccessible = field.canAccess(Objects.requireNonNull(sourceObject)); + this.wasFinal = Modifier.isFinal(fieldModifiers); + this.startMakingEditable(); + } + + private void startMakingEditable() + { + if(!this.wasAccessible) + { + this.field.setAccessible(true); + } + if(this.wasFinal) + { + if(LOG.isTraceEnabled()) + { + LOG.trace( + "Make field {}#{} editable.", + this.field.getDeclaringClass().getSimpleName(), + this.field.getName()); + } + try + { + this.modifiersField.setInt(this.field, this.field.getModifiers() & ~Modifier.FINAL); + } + catch(final IllegalAccessException e) + { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public void close() + { + if(this.wasFinal) + { + if(LOG.isTraceEnabled()) + { + LOG.trace( + "Make field {}#{} immutable.", + this.field.getDeclaringClass().getSimpleName(), + this.field.getName()); + } + try + { + this.modifiersField.setInt(this.field, this.field.getModifiers() | Modifier.FINAL); + } + catch(final IllegalAccessException e) + { + throw new UnsupportedOperationException(e); + } + } + if(!this.wasAccessible) + { + this.field.setAccessible(this.wasAccessible); + } + } + + @Override + public Object getValueOfField(final E objectOfFieldToRead) throws IllegalAccessException + { + return this.field.get(objectOfFieldToRead); + } + + @Override + public void writeValueOfField(final E objectOfFieldToWriteTo, final Object valueToWrite) + throws IllegalAccessException + { + this.field.set(objectOfFieldToWriteTo, valueToWrite); + } +} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldEditableMakerForJavaLowerThan18.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldEditableMakerForJavaLowerThan18.java index 6d81184d..51ca7145 100644 --- a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldEditableMakerForJavaLowerThan18.java +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldEditableMakerForJavaLowerThan18.java @@ -79,7 +79,7 @@ public class FieldEditableMakerForJavaLowerThan18 implements FieldAccessModif private void startMakingEditable() { this.field.setAccessible(true); - if(!this.wasFinal) + if(this.wasFinal) { if(LOG.isTraceEnabled()) { @@ -95,7 +95,7 @@ private void startMakingEditable() @Override public void close() { - if(!this.wasFinal) + if(this.wasFinal) { if(LOG.isTraceEnabled()) { From 83568bad5e22d845c8cdc23de0a8a89056a312d4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 Jan 2024 00:50:33 +0000 Subject: [PATCH 18/40] Bump org.springframework.data:spring-data-commons from 3.2.1 to 3.2.2 Bumps [org.springframework.data:spring-data-commons](https://github.com/spring-projects/spring-data-commons) from 3.2.1 to 3.2.2. - [Release notes](https://github.com/spring-projects/spring-data-commons/releases) - [Commits](https://github.com/spring-projects/spring-data-commons/compare/3.2.1...3.2.2) --- updated-dependencies: - dependency-name: org.springframework.data:spring-data-commons dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- spring-data-eclipse-store/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-data-eclipse-store/pom.xml b/spring-data-eclipse-store/pom.xml index b755298d..e3f77da6 100644 --- a/spring-data-eclipse-store/pom.xml +++ b/spring-data-eclipse-store/pom.xml @@ -52,7 +52,7 @@ 1.1.0-SNAPSHOT 5.8.1 6.1.3 - 3.2.1 + 3.2.2 3.2.0 5.3.3 From 64b8cf3301e8e817e62f852107ac35c76283e322 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 Jan 2024 00:50:35 +0000 Subject: [PATCH 19/40] Bump org.slf4j:slf4j-api from 2.0.9 to 2.0.11 Bumps org.slf4j:slf4j-api from 2.0.9 to 2.0.11. --- updated-dependencies: - dependency-name: org.slf4j:slf4j-api dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- spring-data-eclipse-store/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-data-eclipse-store/pom.xml b/spring-data-eclipse-store/pom.xml index b755298d..dae0d3e1 100644 --- a/spring-data-eclipse-store/pom.xml +++ b/spring-data-eclipse-store/pom.xml @@ -56,7 +56,7 @@ 3.2.0 5.3.3 - 2.0.9 + 2.0.11 4.0.1 3.1.0 From 2624df38adf2fd8ca6c1130d0b995cb79a267976 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 Jan 2024 00:51:01 +0000 Subject: [PATCH 20/40] Bump org.apache.maven.plugins:maven-surefire-plugin from 3.1.2 to 3.2.5 Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.1.2 to 3.2.5. - [Release notes](https://github.com/apache/maven-surefire/releases) - [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.1.2...surefire-3.2.5) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-surefire-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- spring-data-eclipse-store/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-data-eclipse-store/pom.xml b/spring-data-eclipse-store/pom.xml index b755298d..91aceb00 100644 --- a/spring-data-eclipse-store/pom.xml +++ b/spring-data-eclipse-store/pom.xml @@ -291,7 +291,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.1.2 + 3.2.5 --add-opens java.base/java.util=ALL-UNNAMED From ab19e7d5d6840e987dde7631e7cbb7a0db161a59 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 Jan 2024 00:51:05 +0000 Subject: [PATCH 21/40] Bump org.apache.logging.log4j:log4j-slf4j2-impl from 2.22.0 to 2.22.1 Bumps org.apache.logging.log4j:log4j-slf4j2-impl from 2.22.0 to 2.22.1. --- updated-dependencies: - dependency-name: org.apache.logging.log4j:log4j-slf4j2-impl dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- spring-data-eclipse-store/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-data-eclipse-store/pom.xml b/spring-data-eclipse-store/pom.xml index b755298d..00b6da4f 100644 --- a/spring-data-eclipse-store/pom.xml +++ b/spring-data-eclipse-store/pom.xml @@ -206,7 +206,7 @@ org.apache.logging.log4j log4j-slf4j2-impl - 2.22.0 + 2.22.1 test From 824b4b7153d2fa5da2bb52599e79b64f22ba6edb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 Jan 2024 00:51:07 +0000 Subject: [PATCH 22/40] Bump org.apache.logging.log4j:log4j-core from 2.22.0 to 2.22.1 Bumps org.apache.logging.log4j:log4j-core from 2.22.0 to 2.22.1. --- updated-dependencies: - dependency-name: org.apache.logging.log4j:log4j-core dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- spring-data-eclipse-store/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-data-eclipse-store/pom.xml b/spring-data-eclipse-store/pom.xml index b755298d..f7398cf9 100644 --- a/spring-data-eclipse-store/pom.xml +++ b/spring-data-eclipse-store/pom.xml @@ -200,7 +200,7 @@ org.apache.logging.log4j log4j-core - 2.22.0 + 2.22.1 test From 676e718469c73eabb764ff92bd8b2684373d0b5f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 Jan 2024 00:51:14 +0000 Subject: [PATCH 23/40] Bump org.springframework.boot:spring-boot-autoconfigure Bumps [org.springframework.boot:spring-boot-autoconfigure](https://github.com/spring-projects/spring-boot) from 3.2.0 to 3.2.2. - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](https://github.com/spring-projects/spring-boot/compare/v3.2.0...v3.2.2) --- updated-dependencies: - dependency-name: org.springframework.boot:spring-boot-autoconfigure dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- spring-data-eclipse-store/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-data-eclipse-store/pom.xml b/spring-data-eclipse-store/pom.xml index b755298d..6e7bbecf 100644 --- a/spring-data-eclipse-store/pom.xml +++ b/spring-data-eclipse-store/pom.xml @@ -54,7 +54,7 @@ 6.1.3 3.2.1 - 3.2.0 + 3.2.2 5.3.3 2.0.9 4.0.1 From 16f63cece1985005da90801f5b422aaf454d5750 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 Jan 2024 00:51:17 +0000 Subject: [PATCH 24/40] Bump org.apache.logging.log4j:log4j-api from 2.22.0 to 2.22.1 Bumps org.apache.logging.log4j:log4j-api from 2.22.0 to 2.22.1. --- updated-dependencies: - dependency-name: org.apache.logging.log4j:log4j-api dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- spring-data-eclipse-store/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-data-eclipse-store/pom.xml b/spring-data-eclipse-store/pom.xml index b755298d..06ff23e6 100644 --- a/spring-data-eclipse-store/pom.xml +++ b/spring-data-eclipse-store/pom.xml @@ -194,7 +194,7 @@ org.apache.logging.log4j log4j-api - 2.22.0 + 2.22.1 test From b483371948fc8399458e0949c6abef58fd58e917 Mon Sep 17 00:00:00 2001 From: JohannesRabauer Date: Wed, 24 Jan 2024 08:10:44 +0100 Subject: [PATCH 25/40] Tests for final modifier --- .../FieldEditableMakerForJavaLowerThan18.java | 10 ++- .../repositories/CustomerWithFinal.java | 81 +++++++++++++++++ .../repositories/CustomerWithFinalChild.java | 89 +++++++++++++++++++ .../CustomerWithFinalChildRepository.java | 25 ++++++ .../CustomerWithFinalRepository.java | 25 ++++++ .../store/integration/tests/FinalTest.java | 82 +++++++++++++++++ 6 files changed, 310 insertions(+), 2 deletions(-) create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithFinal.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithFinalChild.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithFinalChildRepository.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithFinalRepository.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/FinalTest.java diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldEditableMakerForJavaLowerThan18.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldEditableMakerForJavaLowerThan18.java index 51ca7145..8688914a 100644 --- a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldEditableMakerForJavaLowerThan18.java +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldEditableMakerForJavaLowerThan18.java @@ -78,7 +78,10 @@ public class FieldEditableMakerForJavaLowerThan18 implements FieldAccessModif private void startMakingEditable() { - this.field.setAccessible(true); + if(!this.wasAccessible) + { + this.field.setAccessible(true); + } if(this.wasFinal) { if(LOG.isTraceEnabled()) @@ -106,7 +109,10 @@ public void close() } MODIFIERS.set(this.field, this.field.getModifiers() | Modifier.FINAL); } - this.field.setAccessible(this.wasAccessible); + if(!this.wasAccessible) + { + this.field.setAccessible(this.wasAccessible); + } } @Override diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithFinal.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithFinal.java new file mode 100644 index 00000000..28444961 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithFinal.java @@ -0,0 +1,81 @@ +/* + * Copyright © 2023 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.integration.repositories; + +import java.util.List; +import java.util.Objects; + + +public class CustomerWithFinal +{ + private final String firstName; + private final String lastName; + + public CustomerWithFinal(final String firstName, final String lastName) + { + this.firstName = firstName; + this.lastName = lastName; + } + + public String getFirstName() + { + return this.firstName; + } + + public String getLastName() + { + return this.lastName; + } + + @Override + public String toString() + { + return String.format( + "Customer[firstName='%s', lastName='%s']", + this.firstName, this.lastName); + } + + @Override + public boolean equals(final Object o) + { + if(this == o) + { + return true; + } + if(o == null || this.getClass() != o.getClass()) + { + return false; + } + final CustomerWithFinal customer = (CustomerWithFinal)o; + return Objects.equals(this.firstName, customer.firstName) && Objects.equals( + this.lastName, + customer.lastName); + } + + @Override + public int hashCode() + { + return Objects.hash(this.firstName, this.lastName); + } + + @SuppressWarnings("OptionalGetWithoutIsPresent") + public static CustomerWithFinal getCustomerWithFirstName( + final List customers, + final String firstName) + { + return customers.stream().filter(customer -> customer.getFirstName().equals(firstName)).findFirst().get(); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithFinalChild.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithFinalChild.java new file mode 100644 index 00000000..26eae3f3 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithFinalChild.java @@ -0,0 +1,89 @@ +/* + * Copyright © 2023 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.integration.repositories; + +import java.util.List; +import java.util.Objects; + + +public class CustomerWithFinalChild +{ + private final String firstName; + private final String lastName; + + private final Child child; + + public CustomerWithFinalChild(final String firstName, final String lastName) + { + this.firstName = firstName; + this.lastName = lastName; + this.child = new Child(firstName + "child", lastName + "child"); + } + + public String getFirstName() + { + return this.firstName; + } + + public String getLastName() + { + return this.lastName; + } + + public Child getChild() + { + return this.child; + } + + @Override + public String toString() + { + return String.format( + "Customer[firstName='%s', lastName='%s']", + this.firstName, this.lastName); + } + + @Override + public boolean equals(final Object o) + { + if(this == o) + { + return true; + } + if(o == null || this.getClass() != o.getClass()) + { + return false; + } + final CustomerWithFinalChild customer = (CustomerWithFinalChild)o; + return Objects.equals(this.firstName, customer.firstName) && Objects.equals( + this.lastName, + customer.lastName); + } + + @Override + public int hashCode() + { + return Objects.hash(this.firstName, this.lastName); + } + + @SuppressWarnings("OptionalGetWithoutIsPresent") + public static CustomerWithFinalChild getCustomerWithFirstName( + final List customers, + final String firstName) + { + return customers.stream().filter(customer -> customer.getFirstName().equals(firstName)).findFirst().get(); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithFinalChildRepository.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithFinalChildRepository.java new file mode 100644 index 00000000..e4a572c1 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithFinalChildRepository.java @@ -0,0 +1,25 @@ +/* + * Copyright © 2023 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.integration.repositories; + +import org.springframework.data.repository.CrudRepository; +import org.springframework.data.repository.PagingAndSortingRepository; + + +public interface CustomerWithFinalChildRepository + extends CrudRepository, PagingAndSortingRepository +{ +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithFinalRepository.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithFinalRepository.java new file mode 100644 index 00000000..d0b01af4 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithFinalRepository.java @@ -0,0 +1,25 @@ +/* + * Copyright © 2023 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.integration.repositories; + +import org.springframework.data.repository.CrudRepository; +import org.springframework.data.repository.PagingAndSortingRepository; + + +public interface CustomerWithFinalRepository + extends CrudRepository, PagingAndSortingRepository +{ +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/FinalTest.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/FinalTest.java new file mode 100644 index 00000000..f8afed46 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/FinalTest.java @@ -0,0 +1,82 @@ +/* + * Copyright © 2023 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.integration.tests; + +import java.util.List; + +import jakarta.inject.Inject; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +import software.xdev.spring.data.eclipse.store.helper.TestData; +import software.xdev.spring.data.eclipse.store.helper.TestUtil; +import software.xdev.spring.data.eclipse.store.integration.DefaultTestAnnotations; +import software.xdev.spring.data.eclipse.store.integration.repositories.CustomerWithFinal; +import software.xdev.spring.data.eclipse.store.integration.repositories.CustomerWithFinalChild; +import software.xdev.spring.data.eclipse.store.integration.repositories.CustomerWithFinalChildRepository; +import software.xdev.spring.data.eclipse.store.integration.repositories.CustomerWithFinalRepository; +import software.xdev.spring.data.eclipse.store.repository.EclipseStoreStorage; + + +@DefaultTestAnnotations +class FinalTest +{ + @Inject + private CustomerWithFinalRepository repository; + @Inject + private CustomerWithFinalChildRepository withChildRepository; + + @Inject + private EclipseStoreStorage storage; + + @Test + void testSaveAndFindSingle() + { + final CustomerWithFinal customer = new CustomerWithFinal(TestData.FIRST_NAME, TestData.LAST_NAME); + this.repository.save(customer); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List customers = TestUtil.iterableToList(this.repository.findAll()); + Assertions.assertEquals(1, customers.size()); + Assertions.assertEquals(TestData.FIRST_NAME, customers.get(0).getFirstName()); + } + ); + } + + @Test + void testSaveAndFindSingleWithChild() + { + final CustomerWithFinalChild originalCustomer = + new CustomerWithFinalChild(TestData.FIRST_NAME, TestData.LAST_NAME); + this.withChildRepository.save(originalCustomer); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List customers = + TestUtil.iterableToList(this.withChildRepository.findAll()); + Assertions.assertEquals(1, customers.size()); + Assertions.assertEquals(TestData.FIRST_NAME, customers.get(0).getFirstName()); + Assertions.assertEquals( + originalCustomer.getChild().getFirstName(), + customers.get(0).getChild().getFirstName()); + } + ); + } +} From 03783167caca6f1066d9ef653535d4e5668d4bc1 Mon Sep 17 00:00:00 2001 From: JohannesRabauer Date: Wed, 24 Jan 2024 12:51:48 +0100 Subject: [PATCH 26/40] Writing final fields per reflection is not possible anymore --- spring-data-eclipse-store/pom.xml | 1 + .../IdFieldFinalException.java} | 12 +- .../exceptions/MergeFailedException.java | 6 +- .../store/repository/EclipseStoreStorage.java | 4 +- .../access/modifier/FieldAccessModifier.java | 43 +----- .../access/modifier/FieldAccessibleMaker.java | 28 +++- ...EditableMakerForJavaHigherOrEqualTo18.java | 146 ------------------ .../FieldEditableMakerForJavaLowerThan18.java | 130 ---------------- .../EclipseStoreRepositoryFactory.java | 3 +- .../support/copier/id/SimpleIdSetter.java | 19 ++- .../EclipseSerializerRegisteringCopier.java | 2 +- .../working/RecursiveWorkingCopier.java | 26 +++- .../{ => immutables}/CustomerWithFinal.java | 2 +- .../CustomerWithFinalChild.java | 4 +- .../CustomerWithFinalChildRepository.java | 2 +- .../immutables/CustomerWithFinalId.java | 98 ++++++++++++ .../CustomerWithFinalIdRepository.java | 23 +++ .../CustomerWithFinalRepository.java | 2 +- .../real/life/example/Position.java | 14 +- .../real/life/example/Warehouse.java | 7 +- .../store/integration/tests/FinalTest.java | 21 ++- 21 files changed, 242 insertions(+), 351 deletions(-) rename spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/{repository/access/modifier/FieldAccessModifierToEditable.java => exceptions/IdFieldFinalException.java} (65%) delete mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldEditableMakerForJavaHigherOrEqualTo18.java delete mode 100644 spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldEditableMakerForJavaLowerThan18.java rename spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/{ => immutables}/CustomerWithFinal.java (98%) rename spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/{ => immutables}/CustomerWithFinalChild.java (95%) rename spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/{ => immutables}/CustomerWithFinalChildRepository.java (97%) create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/immutables/CustomerWithFinalId.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/immutables/CustomerWithFinalIdRepository.java rename spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/{ => immutables}/CustomerWithFinalRepository.java (97%) diff --git a/spring-data-eclipse-store/pom.xml b/spring-data-eclipse-store/pom.xml index b755298d..e1a9ca23 100644 --- a/spring-data-eclipse-store/pom.xml +++ b/spring-data-eclipse-store/pom.xml @@ -298,6 +298,7 @@ --add-opens java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-exports java.base/jdk.internal.misc=ALL-UNNAMED + -Djdk.reflect.useDirectMethodHandle=false diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldAccessModifierToEditable.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/IdFieldFinalException.java similarity index 65% rename from spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldAccessModifierToEditable.java rename to spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/IdFieldFinalException.java index dd102ed1..2abfa3e2 100644 --- a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldAccessModifierToEditable.java +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/IdFieldFinalException.java @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package software.xdev.spring.data.eclipse.store.repository.access.modifier; +package software.xdev.spring.data.eclipse.store.exceptions; -/** - * Provides a way to open member variables (fields) to changes. - */ -public interface FieldAccessModifierToEditable extends FieldAccessModifier +public class IdFieldFinalException extends RuntimeException { - void writeValueOfField(E objectOfFieldToWriteTo, Object valueToWrite) throws IllegalAccessException; + public IdFieldFinalException(final String message) + { + super(message); + } } diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/MergeFailedException.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/MergeFailedException.java index 0999a8c3..1a46adf6 100644 --- a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/MergeFailedException.java +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/exceptions/MergeFailedException.java @@ -21,9 +21,9 @@ public MergeFailedException(final Object sourceObject, final Object targetObject { super( String.format( - "Could not merge values of object %s with object %s", - sourceObject.toString(), - targetObject.toString() + "Could not merge values of object %s# with object %s", + sourceObject.getClass().getName(), + targetObject.getClass().getName() ), e ); diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/EclipseStoreStorage.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/EclipseStoreStorage.java index b44f6fee..189941f0 100644 --- a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/EclipseStoreStorage.java +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/EclipseStoreStorage.java @@ -43,14 +43,14 @@ @Component -public class EclipseStoreStorage implements EntityListProvider, IdSetterProvider, PersistableChecker +public class EclipseStoreStorage + implements EntityListProvider, IdSetterProvider, PersistableChecker { private static final Logger LOG = LoggerFactory.getLogger(EclipseStoreStorage.class); private final Map, String> entityClassToRepositoryName = new HashMap<>(); private final Map, IdSetter> entityClassToIdSetter = new HashMap<>(); private EntitySetCollector entitySetCollector; private PersistableChecker persistenceChecker; - private final EclipseStoreProperties storeConfiguration; private final EclipseStoreProvider storeProvider; diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldAccessModifier.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldAccessModifier.java index 7f71471c..f6a9b382 100644 --- a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldAccessModifier.java +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldAccessModifier.java @@ -16,9 +16,7 @@ package software.xdev.spring.data.eclipse.store.repository.access.modifier; import java.lang.reflect.Field; -import java.lang.reflect.InvocationTargetException; import java.util.Objects; -import java.util.concurrent.atomic.AtomicInteger; /** @@ -26,28 +24,6 @@ */ public interface FieldAccessModifier extends AutoCloseable { - AtomicInteger javaVersion = new AtomicInteger(0); - - static FieldAccessModifierToEditable makeFieldEditable(final Field field, final T sourceObject) - throws InvocationTargetException, IllegalAccessException - { - if(javaVersion.get() == 0) - { - javaVersion.set(getJavaVersion()); - } - if(javaVersion.get() < 18) - { - return new FieldEditableMakerForJavaLowerThan18<>( - Objects.requireNonNull(field), - Objects.requireNonNull(sourceObject) - ); - } - return new FieldEditableMakerForJavaHigherOrEqualTo18<>( - Objects.requireNonNull(field), - Objects.requireNonNull(sourceObject) - ); - } - static FieldAccessModifier makeFieldReadable(final Field field, final T sourceObject) { return new FieldAccessibleMaker<>(Objects.requireNonNull(field), Objects.requireNonNull(sourceObject)); @@ -55,21 +31,6 @@ static FieldAccessModifier makeFieldReadable(final Field field, final T s Object getValueOfField(E objectOfFieldToRead) throws IllegalAccessException; - private static int getJavaVersion() - { - String version = System.getProperty("java.version"); - if(version.startsWith("1.")) - { - version = version.substring(2, 3); - } - else - { - final int dot = version.indexOf("."); - if(dot != -1) - { - version = version.substring(0, dot); - } - } - return Integer.parseInt(version); - } + void writeValueOfField(E objectOfFieldToWriteTo, Object valueToWrite, boolean throwExceptionIfFinal) + throws IllegalAccessException; } diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldAccessibleMaker.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldAccessibleMaker.java index 44356496..484ceff5 100644 --- a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldAccessibleMaker.java +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldAccessibleMaker.java @@ -16,6 +16,8 @@ package software.xdev.spring.data.eclipse.store.repository.access.modifier; import java.lang.reflect.Field; +import java.lang.reflect.Modifier; +import java.util.Objects; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -36,11 +38,14 @@ public class FieldAccessibleMaker implements FieldAccessModifier private static final Logger LOG = LoggerFactory.getLogger(FieldAccessibleMaker.class); private final Field field; private final boolean wasAccessible; + private final boolean isFinal; FieldAccessibleMaker(final Field field, final E sourceObject) { this.field = field; - this.wasAccessible = field.canAccess(sourceObject); + this.wasAccessible = field.canAccess(Objects.requireNonNull(sourceObject)); + final int fieldModifiers = field.getModifiers(); + this.isFinal = Modifier.isFinal(fieldModifiers); if(!this.wasAccessible) { if(LOG.isTraceEnabled()) @@ -60,6 +65,27 @@ public Object getValueOfField(final E objectOfFieldToRead) throws IllegalAccessE return this.field.get(objectOfFieldToRead); } + @Override + public void writeValueOfField( + final E objectOfFieldToWriteTo, + final Object valueToWrite, + final boolean throwExceptionIfFinal) + throws IllegalAccessException + { + if(throwExceptionIfFinal && this.isFinal) + { + throw new IllegalAccessException(String.format( + "Field %s:%s is final and cannot be modified. Make the field not final.", + objectOfFieldToWriteTo.toString(), this.field.getName())); + } + this.field.set(objectOfFieldToWriteTo, valueToWrite); + } + + public boolean isFinal() + { + return this.isFinal; + } + @Override public void close() { diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldEditableMakerForJavaHigherOrEqualTo18.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldEditableMakerForJavaHigherOrEqualTo18.java deleted file mode 100644 index 24a439a2..00000000 --- a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldEditableMakerForJavaHigherOrEqualTo18.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Copyright © 2023 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.repository.access.modifier; - -import java.lang.reflect.Field; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.lang.reflect.Modifier; -import java.util.Arrays; -import java.util.Objects; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - - -/** - * {@link Field}s are made modifiable/editable with this class. Should be created through - * {@link FieldAccessModifier}. - *

- * Can be used like this because it is {@link AutoCloseable}: - *

- * - * try(final FieldAccessModifier fem = FieldAccessModifier.makeFieldEditable(field,sourceObject))
{
// Do - * something with the field.
}
- *
- *

- * This is a quite shaky way to make final variables "unfinal". Should work for java versions lower than 18. - *

- * https://stackoverflow.com/a/56043252/2351407 - */ -@SuppressWarnings("java:S3011") -public class FieldEditableMakerForJavaHigherOrEqualTo18 implements FieldAccessModifierToEditable -{ - private static final Logger LOG = LoggerFactory.getLogger(FieldEditableMakerForJavaHigherOrEqualTo18.class); - private final Field field; - private final Field modifiersField; - private final boolean wasFinal; - private final boolean wasAccessible; - - FieldEditableMakerForJavaHigherOrEqualTo18(final Field field, final E sourceObject) - throws InvocationTargetException, IllegalAccessException - { - this.field = Objects.requireNonNull(field); - - final Method[] classMethods = Class.class.getDeclaredMethods(); - - final Method declaredFieldMethod = Arrays.stream(classMethods) - .filter(x -> Objects.equals(x.getName(), "getDeclaredFields0")) - .findAny() - .orElseThrow(); - - declaredFieldMethod.setAccessible(true); - - final Field[] declaredFieldsOfField = (Field[])declaredFieldMethod.invoke(Field.class, false); - - this.modifiersField = Arrays.stream(declaredFieldsOfField) - .filter(x -> Objects.equals(x.getName(), "modifiers")) - .findAny() - .orElseThrow(); - this.modifiersField.setAccessible(true); - - final int fieldModifiers = field.getModifiers(); - this.wasAccessible = field.canAccess(Objects.requireNonNull(sourceObject)); - this.wasFinal = Modifier.isFinal(fieldModifiers); - this.startMakingEditable(); - } - - private void startMakingEditable() - { - if(!this.wasAccessible) - { - this.field.setAccessible(true); - } - if(this.wasFinal) - { - if(LOG.isTraceEnabled()) - { - LOG.trace( - "Make field {}#{} editable.", - this.field.getDeclaringClass().getSimpleName(), - this.field.getName()); - } - try - { - this.modifiersField.setInt(this.field, this.field.getModifiers() & ~Modifier.FINAL); - } - catch(final IllegalAccessException e) - { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public void close() - { - if(this.wasFinal) - { - if(LOG.isTraceEnabled()) - { - LOG.trace( - "Make field {}#{} immutable.", - this.field.getDeclaringClass().getSimpleName(), - this.field.getName()); - } - try - { - this.modifiersField.setInt(this.field, this.field.getModifiers() | Modifier.FINAL); - } - catch(final IllegalAccessException e) - { - throw new UnsupportedOperationException(e); - } - } - if(!this.wasAccessible) - { - this.field.setAccessible(this.wasAccessible); - } - } - - @Override - public Object getValueOfField(final E objectOfFieldToRead) throws IllegalAccessException - { - return this.field.get(objectOfFieldToRead); - } - - @Override - public void writeValueOfField(final E objectOfFieldToWriteTo, final Object valueToWrite) - throws IllegalAccessException - { - this.field.set(objectOfFieldToWriteTo, valueToWrite); - } -} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldEditableMakerForJavaLowerThan18.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldEditableMakerForJavaLowerThan18.java deleted file mode 100644 index 8688914a..00000000 --- a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldEditableMakerForJavaLowerThan18.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright © 2023 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.repository.access.modifier; - -import java.lang.invoke.MethodHandles; -import java.lang.invoke.VarHandle; -import java.lang.reflect.Field; -import java.lang.reflect.Modifier; -import java.util.Objects; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import software.xdev.spring.data.eclipse.store.exceptions.FieldAccessReflectionException; - - -/** - * {@link Field}s are made modifiable/editable with this class. Should be created through - * {@link FieldAccessModifier}. - *

- * Can be used like this because it is {@link AutoCloseable}: - *

- * - * try(final FieldAccessModifier fem = FieldAccessModifier.makeFieldEditable(field,sourceObject))
{
// Do - * something with the field.
}
- *
- *

- * This is a quite shaky way to make final variables "unfinal". Should work for java versions lower than 18. - *

- * https://stackoverflow.com/a/56043252/2351407 - */ -@SuppressWarnings("java:S3011") -public class FieldEditableMakerForJavaLowerThan18 implements FieldAccessModifierToEditable -{ - private static final Logger LOG = LoggerFactory.getLogger(FieldEditableMakerForJavaLowerThan18.class); - private static final VarHandle MODIFIERS; - - static - { - try - { - final var lookup = MethodHandles.privateLookupIn(Field.class, MethodHandles.lookup()); - MODIFIERS = lookup.findVarHandle(Field.class, "modifiers", int.class); - } - catch(final IllegalAccessException | NoSuchFieldException ex) - { - throw new FieldAccessReflectionException( - "Can't find modifiers in Fields. Please check if you're using a java version lower than 18.", - ex); - } - } - - private final Field field; - private final boolean wasFinal; - private final boolean wasAccessible; - - FieldEditableMakerForJavaLowerThan18(final Field field, final E sourceObject) - { - this.field = Objects.requireNonNull(field); - final int fieldModifiers = field.getModifiers(); - this.wasAccessible = field.canAccess(Objects.requireNonNull(sourceObject)); - this.wasFinal = Modifier.isFinal(fieldModifiers); - this.startMakingEditable(); - } - - private void startMakingEditable() - { - if(!this.wasAccessible) - { - this.field.setAccessible(true); - } - if(this.wasFinal) - { - if(LOG.isTraceEnabled()) - { - LOG.trace( - "Make field {}#{} editable.", - this.field.getDeclaringClass().getSimpleName(), - this.field.getName()); - } - MODIFIERS.set(this.field, this.field.getModifiers() & ~Modifier.FINAL); - } - } - - @Override - public void close() - { - if(this.wasFinal) - { - if(LOG.isTraceEnabled()) - { - LOG.trace( - "Make field {}#{} immutable.", - this.field.getDeclaringClass().getSimpleName(), - this.field.getName()); - } - MODIFIERS.set(this.field, this.field.getModifiers() | Modifier.FINAL); - } - if(!this.wasAccessible) - { - this.field.setAccessible(this.wasAccessible); - } - } - - @Override - public Object getValueOfField(final E objectOfFieldToRead) throws IllegalAccessException - { - return this.field.get(objectOfFieldToRead); - } - - @Override - public void writeValueOfField(final E objectOfFieldToWriteTo, final Object valueToWrite) - throws IllegalAccessException - { - this.field.set(objectOfFieldToWriteTo, valueToWrite); - } -} diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/EclipseStoreRepositoryFactory.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/EclipseStoreRepositoryFactory.java index 667d2920..e8469e04 100644 --- a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/EclipseStoreRepositoryFactory.java +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/EclipseStoreRepositoryFactory.java @@ -17,6 +17,8 @@ import java.util.Optional; +import jakarta.annotation.Nonnull; + import org.springframework.data.mapping.model.BasicPersistentEntity; import org.springframework.data.repository.core.EntityInformation; import org.springframework.data.repository.core.RepositoryInformation; @@ -29,7 +31,6 @@ import org.springframework.data.util.TypeInformation; import org.springframework.lang.Nullable; -import jakarta.annotation.Nonnull; import software.xdev.spring.data.eclipse.store.repository.EclipseStoreStorage; import software.xdev.spring.data.eclipse.store.repository.support.copier.working.RecursiveWorkingCopier; import software.xdev.spring.data.eclipse.store.repository.support.copier.working.WorkingCopier; diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/SimpleIdSetter.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/SimpleIdSetter.java index 1d652aa3..5c7a5975 100644 --- a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/SimpleIdSetter.java +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/id/SimpleIdSetter.java @@ -16,11 +16,12 @@ package software.xdev.spring.data.eclipse.store.repository.support.copier.id; import java.lang.reflect.Field; +import java.lang.reflect.Modifier; import java.util.function.Consumer; import software.xdev.spring.data.eclipse.store.exceptions.FieldAccessReflectionException; +import software.xdev.spring.data.eclipse.store.exceptions.IdFieldFinalException; import software.xdev.spring.data.eclipse.store.repository.access.modifier.FieldAccessModifier; -import software.xdev.spring.data.eclipse.store.repository.access.modifier.FieldAccessModifierToEditable; import software.xdev.spring.data.eclipse.store.repository.support.copier.id.strategy.IdFinder; @@ -35,12 +36,24 @@ public SimpleIdSetter(final Field idField, final IdFinder idFinder, final Co this.idField = idField; this.idFinder = idFinder; this.lastIdPersister = lastIdPersister::accept; + this.checkIfIdFieldIsFinal(); + } + + private void checkIfIdFieldIsFinal() + { + final int fieldModifiers = this.idField.getModifiers(); + if(Modifier.isFinal(fieldModifiers)) + { + throw new IdFieldFinalException(String.format( + "Field %s is final and cannot be modified. ID fields must not be final.", + this.idField.getName())); + } } @Override public void ensureId(final T objectToSetIdIn) { - try(final FieldAccessModifierToEditable fam = FieldAccessModifier.makeFieldEditable( + try(final FieldAccessModifier fam = FieldAccessModifier.makeFieldReadable( this.idField, objectToSetIdIn)) { @@ -48,7 +61,7 @@ public void ensureId(final T objectToSetIdIn) if(existingId == null) { final ID newId = this.idFinder.findId(); - fam.writeValueOfField(objectToSetIdIn, newId); + fam.writeValueOfField(objectToSetIdIn, newId, true); this.lastIdPersister.accept(newId); } } diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/object/EclipseSerializerRegisteringCopier.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/object/EclipseSerializerRegisteringCopier.java index 380d6acf..76b98338 100644 --- a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/object/EclipseSerializerRegisteringCopier.java +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/object/EclipseSerializerRegisteringCopier.java @@ -86,7 +86,7 @@ private void lazyInit() .setPersistenceTarget(target)) // Make every type persistable. // This is quite dangerous! - // But if this is not set we get problems f.e. with HashMap$Node + // But if this is not set we get problems e.g. with HashMap$Node .setTypeEvaluatorPersistable(a -> true) .createPersistenceManager(); } diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/RecursiveWorkingCopier.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/RecursiveWorkingCopier.java index c5d9a2c3..3e42602a 100644 --- a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/RecursiveWorkingCopier.java +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/support/copier/working/RecursiveWorkingCopier.java @@ -19,6 +19,7 @@ import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.util.Collection; +import java.util.Objects; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -29,7 +30,6 @@ import software.xdev.spring.data.eclipse.store.repository.WorkingCopyRegistry; import software.xdev.spring.data.eclipse.store.repository.access.AccessHelper; import software.xdev.spring.data.eclipse.store.repository.access.modifier.FieldAccessModifier; -import software.xdev.spring.data.eclipse.store.repository.access.modifier.FieldAccessModifierToEditable; import software.xdev.spring.data.eclipse.store.repository.support.copier.DataTypeUtil; import software.xdev.spring.data.eclipse.store.repository.support.copier.object.EclipseSerializerRegisteringCopier; import software.xdev.spring.data.eclipse.store.repository.support.copier.object.RegisteringObjectCopier; @@ -161,6 +161,12 @@ private void mergeValues( return; } alreadyMergedTargets.collectMergedTarget(targetObject); + + if(sourceObject instanceof String) + { + // no merge needed and no merge possible + return; + } AccessHelper.getInheritedPrivateFieldsByName(sourceObject.getClass()).values().forEach( field -> this.mergeValueOfField(sourceObject, targetObject, field, alreadyMergedTargets, changedCollector) @@ -182,7 +188,7 @@ private void mergeValueOfField( return; } - try(final FieldAccessModifierToEditable fam = FieldAccessModifier.makeFieldEditable( + try(final FieldAccessModifier fam = FieldAccessModifier.makeFieldReadable( field, sourceObject)) { @@ -191,16 +197,24 @@ private void mergeValueOfField( // If the same, then there is nothing to do if(valueOfTargetObject != valueOfSourceObject) { + // If the class is part of the java package, some fields are final and not changeable. + // These special cases are properly handled through the EclipseStore Serialization. + // But to prevent our system to through an error when setting a final field in the java package, + // we use this parameter. + final boolean isPartOfJavaPackage = targetObject.getClass().getPackageName().startsWith("java."); // Something in the containingObject has changed changedCollector.collectChangedObject(targetObject); if(DataTypeUtil.isPrimitiveType(field.getType())) { - fam.writeValueOfField(targetObject, valueOfSourceObject); + if(!Objects.equals(valueOfTargetObject, valueOfSourceObject)) + { + fam.writeValueOfField(targetObject, valueOfSourceObject, !isPartOfJavaPackage); + } } else if(DataTypeUtil.isPrimitiveArray(valueOfSourceObject)) { // Copy complete Array - fam.writeValueOfField(targetObject, valueOfSourceObject); + fam.writeValueOfField(targetObject, valueOfSourceObject, !isPartOfJavaPackage); } else if(DataTypeUtil.isObjectArray(valueOfSourceObject)) { @@ -211,7 +225,7 @@ else if(DataTypeUtil.isObjectArray(valueOfSourceObject)) alreadyMergedTargets, changedCollector ); - fam.writeValueOfField(targetObject, newArray); + fam.writeValueOfField(targetObject, newArray, !isPartOfJavaPackage); } else { @@ -226,7 +240,7 @@ else if(DataTypeUtil.isObjectArray(valueOfSourceObject)) if(valueOfTargetObject != originalValueObjectOfSource) { // If the reference is new, it must be set - fam.writeValueOfField(targetObject, originalValueObjectOfSource); + fam.writeValueOfField(targetObject, originalValueObjectOfSource, !isPartOfJavaPackage); } // Merge after setting reference to avoid endless loops this.mergeValues( diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithFinal.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/immutables/CustomerWithFinal.java similarity index 98% rename from spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithFinal.java rename to spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/immutables/CustomerWithFinal.java index 28444961..5eae308e 100644 --- a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithFinal.java +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/immutables/CustomerWithFinal.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package software.xdev.spring.data.eclipse.store.integration.repositories; +package software.xdev.spring.data.eclipse.store.integration.repositories.immutables; import java.util.List; import java.util.Objects; diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithFinalChild.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/immutables/CustomerWithFinalChild.java similarity index 95% rename from spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithFinalChild.java rename to spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/immutables/CustomerWithFinalChild.java index 26eae3f3..f74c8326 100644 --- a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithFinalChild.java +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/immutables/CustomerWithFinalChild.java @@ -13,11 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package software.xdev.spring.data.eclipse.store.integration.repositories; +package software.xdev.spring.data.eclipse.store.integration.repositories.immutables; import java.util.List; import java.util.Objects; +import software.xdev.spring.data.eclipse.store.integration.repositories.Child; + public class CustomerWithFinalChild { diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithFinalChildRepository.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/immutables/CustomerWithFinalChildRepository.java similarity index 97% rename from spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithFinalChildRepository.java rename to spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/immutables/CustomerWithFinalChildRepository.java index e4a572c1..0eb44e4a 100644 --- a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithFinalChildRepository.java +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/immutables/CustomerWithFinalChildRepository.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package software.xdev.spring.data.eclipse.store.integration.repositories; +package software.xdev.spring.data.eclipse.store.integration.repositories.immutables; import org.springframework.data.repository.CrudRepository; import org.springframework.data.repository.PagingAndSortingRepository; diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/immutables/CustomerWithFinalId.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/immutables/CustomerWithFinalId.java new file mode 100644 index 00000000..f4cad237 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/immutables/CustomerWithFinalId.java @@ -0,0 +1,98 @@ +/* + * Copyright © 2023 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.integration.repositories.immutables; + +import java.util.List; +import java.util.Objects; + +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; + + +public class CustomerWithFinalId +{ + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private final int id = 1; + + private String firstName; + private String lastName; + + public CustomerWithFinalId() + { + } + + public CustomerWithFinalId(final String firstName, final String lastName) + { + this.firstName = firstName; + this.lastName = lastName; + } + + public String getFirstName() + { + return this.firstName; + } + + public String getLastName() + { + return this.lastName; + } + + public Integer getId() + { + return this.id; + } + + @Override + public String toString() + { + return String.format( + "Customer[firstName='%s', lastName='%s']", + this.firstName, this.lastName); + } + + @Override + public boolean equals(final Object o) + { + if(this == o) + { + return true; + } + if(o == null || this.getClass() != o.getClass()) + { + return false; + } + final CustomerWithFinalId customer = (CustomerWithFinalId)o; + return Objects.equals(this.firstName, customer.firstName) && Objects.equals( + this.lastName, + customer.lastName); + } + + @Override + public int hashCode() + { + return Objects.hash(this.firstName, this.lastName); + } + + @SuppressWarnings("OptionalGetWithoutIsPresent") + public static CustomerWithFinalId getCustomerWithFirstName( + final List customers, + final String firstName) + { + return customers.stream().filter(customer -> customer.getFirstName().equals(firstName)).findFirst().get(); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/immutables/CustomerWithFinalIdRepository.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/immutables/CustomerWithFinalIdRepository.java new file mode 100644 index 00000000..7ce5b1fd --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/immutables/CustomerWithFinalIdRepository.java @@ -0,0 +1,23 @@ +/* + * Copyright © 2023 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.integration.repositories.immutables; + +import org.springframework.data.repository.CrudRepository; + + +public interface CustomerWithFinalIdRepository extends CrudRepository +{ +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithFinalRepository.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/immutables/CustomerWithFinalRepository.java similarity index 97% rename from spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithFinalRepository.java rename to spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/immutables/CustomerWithFinalRepository.java index d0b01af4..607c3bf3 100644 --- a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithFinalRepository.java +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/immutables/CustomerWithFinalRepository.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package software.xdev.spring.data.eclipse.store.integration.repositories; +package software.xdev.spring.data.eclipse.store.integration.repositories.immutables; import org.springframework.data.repository.CrudRepository; import org.springframework.data.repository.PagingAndSortingRepository; diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/Position.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/Position.java index 0e7515c0..29b55bc6 100644 --- a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/Position.java +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/Position.java @@ -21,8 +21,8 @@ public class Position { - private final Article article; - private final int amount; + private Article article; + private int amount; public Position(final Article article, final int amount) { @@ -30,6 +30,16 @@ public Position(final Article article, final int amount) this.amount = amount; } + public void setArticle(final Article article) + { + this.article = article; + } + + public void setAmount(final int amount) + { + this.amount = amount; + } + public Article getArticle() { return this.article; diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/Warehouse.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/Warehouse.java index 8b8f4f6b..9f7bd011 100644 --- a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/Warehouse.java +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/Warehouse.java @@ -22,13 +22,18 @@ public class Warehouse { private String name; - private final Set

articles = new HashSet<>(); + private Set
articles = new HashSet<>(); public Set
getArticles() { return this.articles; } + public void setArticles(final Set
articles) + { + this.articles = articles; + } + public String getName() { return this.name; diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/FinalTest.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/FinalTest.java index f8afed46..1fac0ab3 100644 --- a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/FinalTest.java +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/FinalTest.java @@ -22,13 +22,16 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import software.xdev.spring.data.eclipse.store.exceptions.IdFieldFinalException; import software.xdev.spring.data.eclipse.store.helper.TestData; import software.xdev.spring.data.eclipse.store.helper.TestUtil; import software.xdev.spring.data.eclipse.store.integration.DefaultTestAnnotations; -import software.xdev.spring.data.eclipse.store.integration.repositories.CustomerWithFinal; -import software.xdev.spring.data.eclipse.store.integration.repositories.CustomerWithFinalChild; -import software.xdev.spring.data.eclipse.store.integration.repositories.CustomerWithFinalChildRepository; -import software.xdev.spring.data.eclipse.store.integration.repositories.CustomerWithFinalRepository; +import software.xdev.spring.data.eclipse.store.integration.repositories.immutables.CustomerWithFinal; +import software.xdev.spring.data.eclipse.store.integration.repositories.immutables.CustomerWithFinalChild; +import software.xdev.spring.data.eclipse.store.integration.repositories.immutables.CustomerWithFinalChildRepository; +import software.xdev.spring.data.eclipse.store.integration.repositories.immutables.CustomerWithFinalId; +import software.xdev.spring.data.eclipse.store.integration.repositories.immutables.CustomerWithFinalIdRepository; +import software.xdev.spring.data.eclipse.store.integration.repositories.immutables.CustomerWithFinalRepository; import software.xdev.spring.data.eclipse.store.repository.EclipseStoreStorage; @@ -39,6 +42,8 @@ class FinalTest private CustomerWithFinalRepository repository; @Inject private CustomerWithFinalChildRepository withChildRepository; + @Inject + private CustomerWithFinalIdRepository withFinalIdRepository; @Inject private EclipseStoreStorage storage; @@ -79,4 +84,12 @@ void testSaveAndFindSingleWithChild() } ); } + + @Test + void testSaveAndFindSingleWithFinalId() + { + final CustomerWithFinalId originalCustomer = + new CustomerWithFinalId(TestData.FIRST_NAME, TestData.LAST_NAME); + Assertions.assertThrows(IdFieldFinalException.class, () -> this.withFinalIdRepository.save(originalCustomer)); + } } From a60b508f3fef6cc96e4654cb283613de199ea28d Mon Sep 17 00:00:00 2001 From: JohannesRabauer Date: Wed, 24 Jan 2024 13:18:00 +0100 Subject: [PATCH 27/40] IdentitySet fix --- .../xdev/spring/data/eclipse/store/core/IdentitySet.java | 7 ++++--- .../data/eclipse/store/repository/EclipseStoreStorage.java | 2 +- .../repositories/real/life/example/Invoice.java | 7 ++++++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/core/IdentitySet.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/core/IdentitySet.java index d73b2a2d..7984d2fe 100644 --- a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/core/IdentitySet.java +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/core/IdentitySet.java @@ -22,11 +22,11 @@ import java.util.Objects; import java.util.Set; +import jakarta.annotation.Nonnull; + import org.eclipse.serializer.meta.NotImplementedYetError; import org.springframework.lang.NonNull; -import jakarta.annotation.Nonnull; - /** * A hash map implementation depending on object identity (==) rather than equality (.equals) to identify elements. @@ -113,7 +113,8 @@ public boolean retainAll(@Nonnull final Collection c) @Override public boolean removeAll(final Collection c) { - return c.stream().map(this.internalMap::remove).anyMatch(Objects::nonNull); + // "Why toList?" - So that if you input your own reference (this) into this funciton, it does not break. + return c.stream().toList().stream().map(this.internalMap::remove).anyMatch(Objects::nonNull); } @Override diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/EclipseStoreStorage.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/EclipseStoreStorage.java index 189941f0..b34bf850 100644 --- a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/EclipseStoreStorage.java +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/EclipseStoreStorage.java @@ -225,7 +225,7 @@ public synchronized void deleteAll(final Class clazz) this.entitySetCollector.getRelatedIdentitySets(clazz); entityLists.forEach(entityList -> { - entityList.removeAll(entities); + entityList.removeAll(entityList); this.storageManager.store(entityList.getInternalMap()); }); if(LOG.isDebugEnabled()) diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/Invoice.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/Invoice.java index bcd356d3..8af20a95 100644 --- a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/Invoice.java +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/real/life/example/Invoice.java @@ -20,13 +20,18 @@ public class Invoice { - private final List positions; + private List positions; public Invoice(final List positions) { this.positions = positions; } + public void setPositions(final List positions) + { + this.positions = positions; + } + public List getPositions() { return this.positions; From 8a0d905dee5f2cfc20643a44b5d2c1988227f9fc Mon Sep 17 00:00:00 2001 From: JohannesRabauer Date: Thu, 25 Jan 2024 06:58:51 +0100 Subject: [PATCH 28/40] Minor fix --- .../xdev/spring/data/eclipse/store/core/IdentitySet.java | 2 +- .../store/repository/access/modifier/FieldAccessibleMaker.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/core/IdentitySet.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/core/IdentitySet.java index 7984d2fe..d5af7575 100644 --- a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/core/IdentitySet.java +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/core/IdentitySet.java @@ -113,7 +113,7 @@ public boolean retainAll(@Nonnull final Collection c) @Override public boolean removeAll(final Collection c) { - // "Why toList?" - So that if you input your own reference (this) into this funciton, it does not break. + // "Why toList?" - So that if you input your own reference (this) into this function, it does not break. return c.stream().toList().stream().map(this.internalMap::remove).anyMatch(Objects::nonNull); } diff --git a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldAccessibleMaker.java b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldAccessibleMaker.java index 484ceff5..5c0633d8 100644 --- a/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldAccessibleMaker.java +++ b/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/access/modifier/FieldAccessibleMaker.java @@ -55,7 +55,7 @@ public class FieldAccessibleMaker implements FieldAccessModifier this.field.getDeclaringClass().getSimpleName(), this.field.getName()); } - this.field.setAccessible(true); + this.field.trySetAccessible(); } } @@ -98,6 +98,7 @@ public void close() this.field.getDeclaringClass().getSimpleName(), this.field.getName()); } + this.field.setAccessible(false); } } From 5e7bb5de740b0853a77525582fd5209bc85ed268 Mon Sep 17 00:00:00 2001 From: JohannesRabauer Date: Thu, 25 Jan 2024 07:27:04 +0100 Subject: [PATCH 29/40] Added Record tests --- .../repositories/CustomerAsRecord.java | 30 +++++++++ .../CustomerAsRecordRepository.java | 26 ++++++++ .../integration/tests/SimpleSingleTest.java | 66 ++++++++++++++++++- 3 files changed, 121 insertions(+), 1 deletion(-) create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerAsRecord.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerAsRecordRepository.java diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerAsRecord.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerAsRecord.java new file mode 100644 index 00000000..0e082bc9 --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerAsRecord.java @@ -0,0 +1,30 @@ +/* + * Copyright © 2023 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.integration.repositories; + +import java.util.List; + + +public record CustomerAsRecord(String firstName, String lastName) +{ + @SuppressWarnings("OptionalGetWithoutIsPresent") + public CustomerAsRecord getCustomerWithFirstName( + final List customers, + final String firstNameToFind) + { + return customers.stream().filter(customer -> customer.firstName.equals(firstNameToFind)).findFirst().get(); + } +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerAsRecordRepository.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerAsRecordRepository.java new file mode 100644 index 00000000..0061c6de --- /dev/null +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerAsRecordRepository.java @@ -0,0 +1,26 @@ +/* + * Copyright © 2023 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.integration.repositories; + +import java.util.Optional; + +import org.springframework.data.repository.CrudRepository; + + +public interface CustomerAsRecordRepository extends CrudRepository +{ + Optional findByFirstName(String firstName); +} diff --git a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/SimpleSingleTest.java b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/SimpleSingleTest.java index b7ab90e1..35bf4db9 100644 --- a/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/SimpleSingleTest.java +++ b/spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/tests/SimpleSingleTest.java @@ -18,15 +18,18 @@ import java.util.List; import java.util.Optional; +import jakarta.inject.Inject; + import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; -import jakarta.inject.Inject; import software.xdev.spring.data.eclipse.store.helper.TestData; import software.xdev.spring.data.eclipse.store.helper.TestUtil; import software.xdev.spring.data.eclipse.store.integration.DefaultTestAnnotations; import software.xdev.spring.data.eclipse.store.integration.repositories.Customer; +import software.xdev.spring.data.eclipse.store.integration.repositories.CustomerAsRecord; +import software.xdev.spring.data.eclipse.store.integration.repositories.CustomerAsRecordRepository; import software.xdev.spring.data.eclipse.store.integration.repositories.CustomerNotCrud; import software.xdev.spring.data.eclipse.store.integration.repositories.CustomerNotCrudRepository; import software.xdev.spring.data.eclipse.store.integration.repositories.CustomerRepository; @@ -38,6 +41,8 @@ class SimpleSingleTest { @Inject private CustomerRepository repository; + @Inject + private CustomerAsRecordRepository recordRepository; @Inject private EclipseStoreStorage storage; @@ -54,6 +59,65 @@ void testNullFindAll() ); } + @Test + void testBasicSaveAndFindSingleRecords() + { + final CustomerAsRecord customer = new CustomerAsRecord(TestData.FIRST_NAME, TestData.LAST_NAME); + this.recordRepository.save(customer); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List customers = TestUtil.iterableToList(this.recordRepository.findAll()); + Assertions.assertEquals(1, customers.size()); + Assertions.assertEquals(customer, customers.get(0)); + } + ); + } + + @Test + void testBasicSaveAndFindMultipleRecords() + { + final CustomerAsRecord customer = new CustomerAsRecord(TestData.FIRST_NAME, TestData.LAST_NAME); + this.recordRepository.save(customer); + final CustomerAsRecord customer2 = new CustomerAsRecord(null, null); + this.recordRepository.save(customer2); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final List customers = TestUtil.iterableToList(this.recordRepository.findAll()); + final CustomerAsRecord foundCustomer = + customers.stream().filter(c -> TestData.FIRST_NAME.equals(c.firstName())).findFirst().get(); + final CustomerAsRecord foundCustomer2 = + customers.stream().filter(c -> c.firstName() == null).findFirst().get(); + Assertions.assertEquals(2, customers.size()); + Assertions.assertEquals(customer, foundCustomer); + Assertions.assertEquals(customer2, foundCustomer2); + } + ); + } + + @Test + void testBasicSaveAndFindByFirstNameRecords() + { + final CustomerAsRecord customer = new CustomerAsRecord(TestData.FIRST_NAME, TestData.LAST_NAME); + this.recordRepository.save(customer); + final CustomerAsRecord customer2 = + new CustomerAsRecord(TestData.FIRST_NAME_ALTERNATIVE, TestData.LAST_NAME_ALTERNATIVE); + this.recordRepository.save(customer2); + + TestUtil.doBeforeAndAfterRestartOfDatastore( + this.storage, + () -> { + final Optional foundCustomer = + this.recordRepository.findByFirstName(TestData.FIRST_NAME); + Assertions.assertTrue(foundCustomer.isPresent()); + Assertions.assertEquals(customer, foundCustomer.get()); + } + ); + } + @SuppressWarnings("DataFlowIssue") @Test void testNullSave() From 99ff619903e9ec7c9417031a0d72a07f1ac6b3e8 Mon Sep 17 00:00:00 2001 From: JohannesRabauer Date: Thu, 25 Jan 2024 08:33:04 +0100 Subject: [PATCH 30/40] Cleanup --- .run/Run Benchmark.run.xml | 2 +- .run/Run Complex Demo.run.xml | 2 +- .run/Run Simple Demo.run.xml | 1 - README.md | 8 +- spring-data-eclipse-store/pom.xml | 3 - .../exceptions/MergeFailedException.java | 2 +- .../store/repository/EclipseStoreStorage.java | 4 + ...CustomerRepositoryWithNonFinalHashSet.java | 23 ++++ .../CustomerWithNonFinalHashSet.java | 105 +++++++++++++++++ .../store/integration/repositories/Node.java | 7 +- .../store/integration/tests/HashSetTest.java | 111 +++++++++++++++++- ...=> EclipseStoreRegisteringCopierTest.java} | 0 12 files changed, 256 insertions(+), 12 deletions(-) create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerRepositoryWithNonFinalHashSet.java create mode 100644 spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/integration/repositories/CustomerWithNonFinalHashSet.java rename spring-data-eclipse-store/src/test/java/software/xdev/spring/data/eclipse/store/repository/support/copier/object/{MicroStreamRegisteringCopierTest.java => EclipseStoreRegisteringCopierTest.java} (100%) diff --git a/.run/Run Benchmark.run.xml b/.run/Run Benchmark.run.xml index 9cd7a859..6179ce56 100644 --- a/.run/Run Benchmark.run.xml +++ b/.run/Run Benchmark.run.xml @@ -2,7 +2,7 @@