diff --git a/documentation/documentation.gradle b/documentation/documentation.gradle index fadcfc94124c..bc0c2e42a70b 100644 --- a/documentation/documentation.gradle +++ b/documentation/documentation.gradle @@ -12,10 +12,9 @@ plugins { */ -apply from: rootProject.file( 'gradle/java-module.gradle' ) +apply from: rootProject.file( 'gradle/module.gradle' ) apply from: rootProject.file( 'gradle/releasable.gradle' ) -apply plugin: 'org.hibernate.matrix-test' apply plugin: 'org.hibernate.orm.build.reports' tasks.build.dependsOn 'buildDocs' @@ -38,46 +37,16 @@ dependencies { reportAggregation project(':hibernate-ant') reportAggregation project(':hibernate-enhance-maven-plugin') reportAggregation project(':hibernate-jpamodelgen') - - implementation project( ':hibernate-core' ) - - annotationProcessor project( ':hibernate-jpamodelgen' ) - - testImplementation project(':hibernate-testing') - testImplementation project(':hibernate-envers') - testImplementation project(':hibernate-spatial') - testImplementation project(':hibernate-jcache') - testImplementation project( path: ':hibernate-core', configuration: 'tests' ) - - testImplementation 'org.apache.commons:commons-lang3:3.4' - testImplementation 'org.osgi:org.osgi.core:4.3.1' - - testImplementation testLibs.mockito - testImplementation testLibs.mockitoInline - - testImplementation jakartaLibs.jaxbApi - testImplementation jakartaLibs.jaxb - testImplementation jakartaLibs.jsonb - testImplementation libs.jacksonXml - - testRuntimeOnly testLibs.wildFlyTxnClient - testRuntimeOnly(libs.ehcache3) { - capabilities { - requireCapability 'org.ehcache.modules:ehcache-xml-jakarta' - } - } - // Needed for JSON tests - testRuntimeOnly libs.jackson } if ( project.ormVersion.isSnapshot ) { // only run the ci build tasks for SNAPSHOT versions - task ciBuild( dependsOn: [clean, test] ) + task ciBuild( dependsOn: [clean] ) tasks.release.enabled false } else { - tasks.release.dependsOn clean, test + tasks.release.dependsOn clean } // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -303,12 +272,3 @@ tasks.withType(AsciidoctorTask).all { backends 'html5' } } - -// resources inherently exclude sources -sourceSets.test.resources { - setSrcDirs( ['src/test/java','src/test/resources'] ) -} - - -checkstyleMain.exclude '**/org/hibernate/userguide/model/*' - diff --git a/documentation/src/main/asciidoc/userguide/appendices/LegacyBasicTypeResolution.adoc b/documentation/src/main/asciidoc/userguide/appendices/LegacyBasicTypeResolution.adoc index c04727b58591..81ed431616c2 100644 --- a/documentation/src/main/asciidoc/userguide/appendices/LegacyBasicTypeResolution.adoc +++ b/documentation/src/main/asciidoc/userguide/appendices/LegacyBasicTypeResolution.adoc @@ -1,4 +1,6 @@ -:sourcedir: ../../../../test/java/org/hibernate/userguide/mapping +:root-project-dir: ../../../../../.. +:core-project-dir: {root-project-dir}/hibernate-core +:sourcedir: {core-project-dir}/src/test/java/org/hibernate/orm/test/mapping :extrasdir: extras :originalextrasdir: ../chapters/domain/extras diff --git a/documentation/src/main/asciidoc/userguide/chapters/batch/Batching.adoc b/documentation/src/main/asciidoc/userguide/chapters/batch/Batching.adoc index d6c80a513e7b..2154de949fd4 100644 --- a/documentation/src/main/asciidoc/userguide/chapters/batch/Batching.adoc +++ b/documentation/src/main/asciidoc/userguide/chapters/batch/Batching.adoc @@ -1,9 +1,8 @@ [[batch]] == Batching :root-project-dir: ../../../../../../.. -:documentation-project-dir: {root-project-dir}/documentation :core-project-dir: {root-project-dir}/hibernate-core -:example-dir-doc-batch: {documentation-project-dir}/src/test/java/org/hibernate/userguide/batch +:example-dir-doc-batch: {core-project-dir}/src/test/java/org/hibernate/orm/test/batch :example-dir-bulkid: {core-project-dir}/src/test/java/org/hibernate/orm/test/bulkid :extrasdir: extras @@ -49,7 +48,7 @@ Since version 5.2, Hibernate allows overriding the global JDBC batch size given ==== [source, JAVA, indent=0] ---- -include::{example-dir-doc-batch}/BatchTest.java[tags=batch-session-jdbc-batch-size-example] +include::{example-dir-doc-batch}/BatchTests.java[tags=batch-session-jdbc-batch-size-example] ---- ==== @@ -63,7 +62,7 @@ The following example shows an anti-pattern for batch inserts. ==== [source, JAVA, indent=0] ---- -include::{example-dir-doc-batch}/BatchTest.java[tags=batch-session-batch-example] +include::{example-dir-doc-batch}/BatchTests.java[tags=batch-session-batch-example] ---- ==== @@ -91,7 +90,7 @@ When you make new objects persistent, employ methods `flush()` and `clear()` to ==== [source, JAVA, indent=0] ---- -include::{example-dir-doc-batch}/BatchTest.java[tags=batch-session-batch-insert-example] +include::{example-dir-doc-batch}/BatchTests.java[tags=batch-session-batch-insert-example] ---- ==== @@ -106,7 +105,7 @@ In addition, use method `scroll()` to take advantage of server-side cursors for ==== [source, JAVA, indent=0] ---- -include::{example-dir-doc-batch}/BatchTest.java[tags=batch-session-scroll-example] +include::{example-dir-doc-batch}/BatchTests.java[tags=batch-session-scroll-example] ---- ==== @@ -152,7 +151,7 @@ IMPORTANT: Due to the lack of a first-level cache, stateless sessions are vulner ==== [source, JAVA, indent=0] ---- -include::{example-dir-doc-batch}/BatchTest.java[tags=batch-stateless-session-example] +include::{example-dir-doc-batch}/BatchTests.java[tags=batch-stateless-session-example] ---- ==== @@ -208,7 +207,7 @@ You can use sub-queries in the `WHERE` clause, and the sub-queries themselves ca ==== [source, JAVA, indent=0] ---- -include::{example-dir-doc-batch}/BatchTest.java[tags=batch-bulk-jpql-update-example] +include::{example-dir-doc-batch}/BatchTests.java[tags=batch-bulk-jpql-update-example] ---- ==== @@ -217,7 +216,7 @@ include::{example-dir-doc-batch}/BatchTest.java[tags=batch-bulk-jpql-update-exam ==== [source, JAVA, indent=0] ---- -include::{example-dir-doc-batch}/BatchTest.java[tags=batch-bulk-hql-update-example] +include::{example-dir-doc-batch}/BatchTests.java[tags=batch-bulk-hql-update-example] ---- ==== @@ -229,7 +228,7 @@ You can use a versioned update to force Hibernate to reset the version or timest ==== [source, JAVA, indent=0] ---- -include::{example-dir-doc-batch}/BatchTest.java[tags=batch-bulk-hql-update-version-example] +include::{example-dir-doc-batch}/BatchTests.java[tags=batch-bulk-hql-update-version-example] ---- ==== @@ -245,7 +244,7 @@ This feature is only available in HQL since it's not standardized by Jakarta Per ==== [source, JAVA, indent=0] ---- -include::{example-dir-doc-batch}/BatchTest.java[tags=batch-bulk-jpql-delete-example] +include::{example-dir-doc-batch}/BatchTests.java[tags=batch-bulk-jpql-delete-example] ---- ==== @@ -254,7 +253,7 @@ include::{example-dir-doc-batch}/BatchTest.java[tags=batch-bulk-jpql-delete-exam ==== [source, JAVA, indent=0] ---- -include::{example-dir-doc-batch}/BatchTest.java[tags=batch-bulk-hql-delete-example] +include::{example-dir-doc-batch}/BatchTests.java[tags=batch-bulk-hql-delete-example] ---- ==== @@ -312,7 +311,7 @@ in which case the seed value defined by the `org.hibernate.type.descriptor.java. ==== [source, JAVA, indent=0] ---- -include::{example-dir-doc-batch}/BatchTest.java[tags=batch-bulk-hql-insert-example] +include::{example-dir-doc-batch}/BatchTests.java[tags=batch-bulk-hql-insert-example] ---- ==== diff --git a/documentation/src/main/asciidoc/userguide/chapters/bootstrap/Bootstrap.adoc b/documentation/src/main/asciidoc/userguide/chapters/bootstrap/Bootstrap.adoc index 2bb2152299b9..ad8eca619524 100644 --- a/documentation/src/main/asciidoc/userguide/chapters/bootstrap/Bootstrap.adoc +++ b/documentation/src/main/asciidoc/userguide/chapters/bootstrap/Bootstrap.adoc @@ -1,10 +1,10 @@ [[bootstrap]] == Bootstrap :root-project-dir: ../../../../../../.. -:documentation-project-dir: {root-project-dir}/documentation :core-project-dir: {root-project-dir}/hibernate-core -:example-dir-boot: {documentation-project-dir}/src/test/java/org/hibernate/userguide/bootstrap -:example-dir-boot-spi: {core-project-dir}/src/test/java/org/hibernate/orm/test/bootstrap/spi +:core-test-base: {core-project-dir}/src/test/java/org/hibernate/orm/test +:example-dir-boot: {core-test-base}/bootstrap +:example-dir-boot-spi: {core-test-base}/bootstrap/spi :extrasdir: extras The term bootstrapping refers to initializing and starting a software component. diff --git a/documentation/src/main/asciidoc/userguide/chapters/caching/Caching.adoc b/documentation/src/main/asciidoc/userguide/chapters/caching/Caching.adoc index cc3504d992fc..74c8eec2dc00 100644 --- a/documentation/src/main/asciidoc/userguide/chapters/caching/Caching.adoc +++ b/documentation/src/main/asciidoc/userguide/chapters/caching/Caching.adoc @@ -1,8 +1,8 @@ [[caching]] == Caching :root-project-dir: ../../../../../../.. -:documentation-project-dir: {root-project-dir}/documentation -:example-dir-caching: {documentation-project-dir}/src/test/java/org/hibernate/userguide/caching +:jcache-project-dir: {root-project-dir}/hibernate-jcache +:example-dir-caching: {jcache-project-dir}/src/test/java/org/hibernate/orm/test/caching At runtime, Hibernate handles moving data into and out of the second-level cache in response to the operations performed by the `Session`, which acts as a transaction-level cache of persistent data. Once an entity becomes managed, that object is added to the internal cache of the current persistence context (`EntityManager` or `Session`). diff --git a/documentation/src/main/asciidoc/userguide/chapters/domain/access.adoc b/documentation/src/main/asciidoc/userguide/chapters/domain/access.adoc index c552d105eb4e..6d6abe8bddad 100644 --- a/documentation/src/main/asciidoc/userguide/chapters/domain/access.adoc +++ b/documentation/src/main/asciidoc/userguide/chapters/domain/access.adoc @@ -1,8 +1,8 @@ [[access]] === Access strategies :root-project-dir: ../../../../../../.. -:documentation-project-dir: {root-project-dir}/documentation -:example-dir-access: {documentation-project-dir}/src/test/java/org/hibernate/userguide/mapping/access +:core-project-dir: {root-project-dir}/hibernate-core +:example-dir-access: {core-project-dir}/src/test/java/org/hibernate/orm/test/mapping/access :extrasdir: extras As a Jakarta Persistence provider, Hibernate can introspect both the entity attributes (instance fields) or the accessors (instance properties). diff --git a/documentation/src/main/asciidoc/userguide/chapters/domain/associations.adoc b/documentation/src/main/asciidoc/userguide/chapters/domain/associations.adoc index 696671d158a0..7cc0aea7620c 100644 --- a/documentation/src/main/asciidoc/userguide/chapters/domain/associations.adoc +++ b/documentation/src/main/asciidoc/userguide/chapters/domain/associations.adoc @@ -1,8 +1,8 @@ [[associations]] === Associations :root-project-dir: ../../../../../../.. -:documentation-project-dir: {root-project-dir}/documentation -:example-dir-association: {documentation-project-dir}/src/test/java/org/hibernate/userguide/associations +:core-project-dir: {root-project-dir}/hibernate-core +:example-dir-association: {core-project-dir}/src/test/java/org/hibernate/orm/test/associations :extrasdir: extras/associations Associations describe how two or more entities form a relationship based on a database joining semantics. diff --git a/documentation/src/main/asciidoc/userguide/chapters/domain/basic_types.adoc b/documentation/src/main/asciidoc/userguide/chapters/domain/basic_types.adoc index db5c51d8aa7b..0da27e3806d0 100644 --- a/documentation/src/main/asciidoc/userguide/chapters/domain/basic_types.adoc +++ b/documentation/src/main/asciidoc/userguide/chapters/domain/basic_types.adoc @@ -1,13 +1,12 @@ [[basic]] === Basic values :root-project-dir: ../../../../../../.. -:documentation-project-dir: {root-project-dir}/documentation -:documentation-example-base: {documentation-project-dir}/src/test/ -:example-dir-model: {documentation-project-dir}/src/main/java/org/hibernate/userguide/model -:example-dir-basic-mapping: {documentation-example-base}/java/org/hibernate/userguide/mapping -:example-dir-resources: {documentation-example-base}/resources/org/hibernate/userguide/ +:testing-project-dir: {root-project-dir}/hibernate-testing +:example-dir-model: {testing-project-dir}/src/main/java/org/hibernate/testing/orm/domain/userguide :core-project-dir: {root-project-dir}/hibernate-core :core-test-base: {core-project-dir}/src/test +:example-dir-basic-mapping: {core-test-base}/java/org/hibernate/orm/test/mapping +:example-dir-resources: {core-test-base}/resources/org/hibernate/orm/test/ :example-dir-generated: {core-test-base}/java/org/hibernate/orm/test/mapping/generated :example-dir-converter: {core-test-base}/java/org/hibernate/orm/test/mapping/converted/converter :extrasdir: extras diff --git a/documentation/src/main/asciidoc/userguide/chapters/domain/collections.adoc b/documentation/src/main/asciidoc/userguide/chapters/domain/collections.adoc index eaebe2aec64c..39f2bd84b9eb 100644 --- a/documentation/src/main/asciidoc/userguide/chapters/domain/collections.adoc +++ b/documentation/src/main/asciidoc/userguide/chapters/domain/collections.adoc @@ -2,8 +2,6 @@ === Collections :majorMinorVersion: 6.2 :root-project-dir: ../../../../../../.. -:documentation-project-dir: {root-project-dir}/documentation -:example-dir-collection-doc: {documentation-project-dir}/src/test/java/org/hibernate/userguide/collections :core-project-dir: {root-project-dir}/hibernate-core :core-test-base: {core-project-dir}/src/test/java :example-dir-collection: {core-test-base}/org/hibernate/orm/test/mapping/collections @@ -484,7 +482,7 @@ Behind the scenes, Hibernate requires an association table to manage the parent- ==== [source,java] ---- -include::{example-dir-collection-doc}/UnidirectionalBagTest.java[tags=collections-unidirectional-bag-example,indent=0] +include::{example-dir-collection}/UnidirectionalBagTest.java[tags=collections-unidirectional-bag-example,indent=0] ---- [source,sql] @@ -507,7 +505,7 @@ By marking the parent side with the `CascadeType.ALL` attribute, the unidirectio ==== [source,java] ---- -include::{example-dir-collection-doc}/UnidirectionalBagTest.java[tags=collections-unidirectional-bag-lifecycle-example,indent=0] +include::{example-dir-collection}/UnidirectionalBagTest.java[tags=collections-unidirectional-bag-lifecycle-example,indent=0] ---- [source,sql] @@ -536,7 +534,7 @@ The `@ManyToOne` side is the owning side of the bidirectional bag association, w ==== [source,java] ---- -include::{example-dir-collection-doc}/BidirectionalBagTest.java[tags=collections-bidirectional-bag-example,indent=0] +include::{example-dir-collection}/BidirectionalBagTest.java[tags=collections-bidirectional-bag-example,indent=0] ---- [source,sql] @@ -550,7 +548,7 @@ include::{extrasdir}/collections-bidirectional-bag-example.sql[] ==== [source,java] ---- -include::{example-dir-collection-doc}/BidirectionalBagTest.java[tags=collections-bidirectional-bag-lifecycle-example,indent=0] +include::{example-dir-collection}/BidirectionalBagTest.java[tags=collections-bidirectional-bag-lifecycle-example,indent=0] ---- [source,sql] @@ -564,7 +562,7 @@ include::{extrasdir}/collections-bidirectional-bag-lifecycle-example.sql[] ==== [source,java] ---- -include::{example-dir-collection-doc}/BidirectionalBagOrphanRemovalTest.java[tags=collections-bidirectional-bag-orphan-removal-example,indent=0] +include::{example-dir-collection}/BidirectionalBagOrphanRemovalTest.java[tags=collections-bidirectional-bag-orphan-removal-example,indent=0] ---- [source,sql] @@ -594,7 +592,7 @@ When using the `@OrderBy` annotation, the mapping looks as follows: ==== [source,java] ---- -include::{example-dir-collection-doc}/UnidirectionalOrderedByListTest.java[tags=collections-unidirectional-ordered-list-order-by-example,indent=0] +include::{example-dir-collection}/UnidirectionalOrderedByListTest.java[tags=collections-unidirectional-ordered-list-order-by-example,indent=0] ---- ==== @@ -626,7 +624,7 @@ Another ordering option is to use the `@OrderColumn` annotation: ==== [source,java] ---- -include::{example-dir-collection-doc}/UnidirectionalOrderColumnListTest.java[tags=collections-unidirectional-ordered-list-order-column-example,indent=0] +include::{example-dir-collection}/UnidirectionalOrderColumnListTest.java[tags=collections-unidirectional-ordered-list-order-column-example,indent=0] ---- [source,sql] @@ -659,7 +657,7 @@ The mapping is similar with the <> example, just ==== [source,java] ---- -include::{example-dir-collection-doc}/BidirectionalOrderByListTest.java[tags=collections-bidirectional-ordered-list-order-by-example,indent=0] +include::{example-dir-collection}/BidirectionalOrderByListTest.java[tags=collections-bidirectional-ordered-list-order-by-example,indent=0] ---- ==== @@ -672,7 +670,7 @@ When using the `@OrderColumn` annotation, the `order_id` column is going to be e ==== [source,java] ---- -include::{example-dir-collection-doc}/BidirectionalOrderColumnListTest.java[tags=collections-bidirectional-ordered-list-order-column-example,indent=0] +include::{example-dir-collection}/BidirectionalOrderColumnListTest.java[tags=collections-bidirectional-ordered-list-order-column-example,indent=0] ---- [source,sql] @@ -693,7 +691,7 @@ You can customize the ordinal of the underlying ordered list by using the https: ==== [source,java] ---- -include::{example-dir-collection-doc}/OrderColumnListIndexBaseTest.java[tags=collections-customizing-ordered-list-ordinal-mapping-example,indent=0] +include::{example-dir-collection}/OrderColumnListIndexBaseTest.java[tags=collections-customizing-ordered-list-ordinal-mapping-example,indent=0] ---- ==== @@ -704,7 +702,7 @@ When inserting two `Phone` records, Hibernate is going to start the List index f ==== [source,java] ---- -include::{example-dir-collection-doc}/OrderColumnListIndexBaseTest.java[tags=collections-customizing-ordered-list-ordinal-persist-example,indent=0] +include::{example-dir-collection}/OrderColumnListIndexBaseTest.java[tags=collections-customizing-ordered-list-ordinal-persist-example,indent=0] ---- [source,sql] @@ -729,7 +727,7 @@ by the number of characters of the `name` attribute. ==== [source,java] ---- -include::{example-dir-collection-doc}/OrderedBySQLTest.java[tags=collections-customizing-ordered-by-sql-clause-mapping-example,indent=0] +include::{example-dir-collection}/OrderedBySQLTest.java[tags=collections-customizing-ordered-by-sql-clause-mapping-example,indent=0] ---- ==== @@ -740,7 +738,7 @@ When fetching the `articles` collection, Hibernate uses the ORDER BY SQL clause ==== [source,java] ---- -include::{example-dir-collection-doc}/OrderedBySQLTest.java[tags=collections-customizing-ordered-by-sql-clause-fetching-example,indent=0] +include::{example-dir-collection}/OrderedBySQLTest.java[tags=collections-customizing-ordered-by-sql-clause-fetching-example,indent=0] ---- [source,sql] @@ -764,7 +762,7 @@ The unidirectional set uses a link table to hold the parent-child associations a ==== [source,java] ---- -include::{example-dir-collection-doc}/UnidirectionalSetTest.java[tags=collections-unidirectional-set-example,indent=0] +include::{example-dir-collection}/UnidirectionalSetTest.java[tags=collections-unidirectional-set-example,indent=0] ---- ==== @@ -789,7 +787,7 @@ The lifecycle is just like with bidirectional bags except for the duplicates whi ==== [source,java] ---- -include::{example-dir-collection-doc}/BidirectionalSetTest.java[tags=collections-bidirectional-set-example,indent=0] +include::{example-dir-collection}/BidirectionalSetTest.java[tags=collections-bidirectional-set-example,indent=0] ---- ==== @@ -809,7 +807,7 @@ A `SortedSet` that relies on the natural sorting order given by the child elemen ==== [source,java] ---- -include::{example-dir-collection-doc}/UnidirectionalSortedSetTest.java[tags=collections-unidirectional-sorted-set-natural-comparator-example,indent=0] +include::{example-dir-collection}/UnidirectionalSortedSetTest.java[tags=collections-unidirectional-sorted-set-natural-comparator-example,indent=0] ---- ==== @@ -822,7 +820,7 @@ To provide a custom sorting logic, Hibernate also provides a `@SortComparator` a ==== [source,java] ---- -include::{example-dir-collection-doc}/UnidirectionalComparatorSortedSetTest.java[tags=collections-unidirectional-sorted-set-custom-comparator-example,indent=0] +include::{example-dir-collection}/UnidirectionalComparatorSortedSetTest.java[tags=collections-unidirectional-sorted-set-custom-comparator-example,indent=0] ---- ==== @@ -836,9 +834,9 @@ The `@SortNatural` and `@SortComparator` work the same for bidirectional sorted ==== [source,java] ---- -include::{example-dir-collection-doc}/BidirectionalSortedSetTest.java[tags=collections-bidirectional-sorted-set-example,indent=0] +include::{example-dir-collection}/BidirectionalSortedSetTest.java[tags=collections-bidirectional-sorted-set-example,indent=0] -include::{example-dir-collection-doc}/UnidirectionalComparatorSortedSetTest.java[lines=75..77,indent=0] +include::{example-dir-collection}/UnidirectionalComparatorSortedSetTest.java[lines=75..77,indent=0] ---- ==== @@ -871,7 +869,7 @@ A map of value type must use the `@ElementCollection` annotation, just like valu ==== [source,java] ---- -include::{example-dir-collection-doc}/ElementCollectionMapTest.java[tags=collections-map-value-type-entity-key-example,indent=0] +include::{example-dir-collection}/ElementCollectionMapTest.java[tags=collections-map-value-type-entity-key-example,indent=0] ---- [source,sql] @@ -887,7 +885,7 @@ Adding entries to the map generates the following SQL statements: ==== [source,java] ---- -include::{example-dir-collection-doc}/ElementCollectionMapTest.java[tags=collections-map-value-type-entity-key-add-example,indent=0] +include::{example-dir-collection}/ElementCollectionMapTest.java[tags=collections-map-value-type-entity-key-add-example,indent=0] ---- [source,sql] @@ -925,7 +923,7 @@ Since we want to map all the calls by their associated `java.util.Date`, not by ==== [source,java] ---- -include::{example-dir-collection-doc}/MapKeyTypeTest.java[tags=collections-map-custom-key-type-mapping-example,indent=0] +include::{example-dir-collection}/MapKeyTypeTest.java[tags=collections-map-custom-key-type-mapping-example,indent=0] ---- ==== @@ -940,7 +938,7 @@ Considering you have the following `PhoneNumber` interface with an implementatio ==== [source,java] ---- -include::{example-dir-collection-doc}/MapKeyClassTest.java[tags=collections-map-key-class-type-mapping-example,indent=0] +include::{example-dir-collection}/MapKeyClassTest.java[tags=collections-map-key-class-type-mapping-example,indent=0] ---- ==== @@ -952,7 +950,7 @@ If you want to use the `PhoneNumber` interface as a `java.util.Map` key, then yo ==== [source,java] ---- -include::{example-dir-collection-doc}/MapKeyClassTest.java[tags=collections-map-key-class-mapping-example,indent=0] +include::{example-dir-collection}/MapKeyClassTest.java[tags=collections-map-key-class-mapping-example,indent=0] ---- [source,sql] @@ -969,7 +967,7 @@ Hibernate generates the following SQL statements: ==== [source,java] ---- -include::{example-dir-collection-doc}/MapKeyClassTest.java[tags=collections-map-key-class-persist-example,indent=0] +include::{example-dir-collection}/MapKeyClassTest.java[tags=collections-map-key-class-persist-example,indent=0] ---- [source,sql] @@ -986,7 +984,7 @@ Hibernate generates the following SQL statements: ==== [source,java] ---- -include::{example-dir-collection-doc}/MapKeyClassTest.java[tags=collections-map-key-class-fetch-example,indent=0] +include::{example-dir-collection}/MapKeyClassTest.java[tags=collections-map-key-class-fetch-example,indent=0] ---- [source,sql] @@ -1013,7 +1011,7 @@ The `@MapKey` annotation is used to define the entity attribute used as a key of ==== [source,java] ---- -include::{example-dir-collection-doc}/UnidirectionalMapTest.java[tags=collections-map-unidirectional-example,indent=0] +include::{example-dir-collection}/UnidirectionalMapTest.java[tags=collections-map-unidirectional-example,indent=0] ---- [source,sql] @@ -1034,7 +1032,7 @@ In the following example, you can see that `@MapKeyEnumerated` was used so that ==== [source,java] ---- -include::{example-dir-collection-doc}/BidirectionalMapTest.java[tags=collections-map-bidirectional-example,indent=0] +include::{example-dir-collection}/BidirectionalMapTest.java[tags=collections-map-bidirectional-example,indent=0] ---- [source,sql] @@ -1068,7 +1066,7 @@ but now, Hibernate will leverage the native array data types if possible. ==== [source,java] ---- -include::{example-dir-collection-doc}/ArrayTest.java[tags=collections-array-as-basic-example,indent=0] +include::{example-dir-collection}/ArrayTest.java[tags=collections-array-as-basic-example,indent=0] ---- [source,sql] @@ -1091,7 +1089,7 @@ default mapped like basic arrays as depicted in the <. - */ -package org.hibernate.userguide.model; - -import java.time.LocalDateTime; -import jakarta.persistence.Column; -import jakarta.persistence.Entity; -import jakarta.persistence.GeneratedValue; -import jakarta.persistence.Id; -import jakarta.persistence.ManyToOne; -import jakarta.persistence.Table; - -/** - * @author Vlad Mihalcea - */ -//tag::hql-examples-domain-model-example[] -@Entity -@Table(name = "phone_call") -public class Call { - - @Id - @GeneratedValue - private Long id; - - @ManyToOne - private Phone phone; - - @Column(name = "call_timestamp") - private LocalDateTime timestamp; - - private int duration; - - @ManyToOne - private Payment payment; - - //Getters and setters are omitted for brevity - -//end::hql-examples-domain-model-example[] - public Call() {} - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Phone getPhone() { - return phone; - } - - public void setPhone(Phone phone) { - this.phone = phone; - } - - public LocalDateTime getTimestamp() { - return timestamp; - } - - public void setTimestamp(LocalDateTime timestamp) { - this.timestamp = timestamp; - } - - public int getDuration() { - return duration; - } - - public void setDuration(int duration) { - this.duration = duration; - } - - public Payment getPayment() { - return payment; - } - - public void setPayment(Payment payment) { - this.payment = payment; - } - //tag::hql-examples-domain-model-example[] -} -//end::hql-examples-domain-model-example[] diff --git a/documentation/src/main/java/org/hibernate/userguide/model/Payment.java b/documentation/src/main/java/org/hibernate/userguide/model/Payment.java deleted file mode 100644 index a74e832cbe43..000000000000 --- a/documentation/src/main/java/org/hibernate/userguide/model/Payment.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . - */ -package org.hibernate.userguide.model; - -import java.math.BigDecimal; -import jakarta.persistence.Entity; -import jakarta.persistence.GeneratedValue; -import jakarta.persistence.Id; -import jakarta.persistence.Inheritance; -import jakarta.persistence.InheritanceType; -import jakarta.persistence.ManyToOne; - -/** - * @author Vlad Mihalcea - */ -//tag::hql-examples-domain-model-example[] -@Entity -@Inheritance(strategy = InheritanceType.JOINED) -public class Payment { - - @Id - @GeneratedValue - private Long id; - - private BigDecimal amount; - - private boolean completed; - - @ManyToOne - private Account account; - - @ManyToOne - private Person person; - - //Getters and setters are omitted for brevity - -//end::hql-examples-domain-model-example[] - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public BigDecimal getAmount() { - return amount; - } - - public void setAmount(BigDecimal amount) { - this.amount = amount; - } - - public boolean isCompleted() { - return completed; - } - - public void setCompleted(boolean completed) { - this.completed = completed; - } - - public Person getPerson() { - return person; - } - - public void setPerson(Person person) { - this.person = person; - } - - public Account getAccount() { - return account; - } - - public void setAccount(Account account) { - this.account = account; - } - //tag::hql-examples-domain-model-example[] -} -//end::hql-examples-domain-model-example[] diff --git a/documentation/src/main/java/org/hibernate/userguide/model/Person.java b/documentation/src/main/java/org/hibernate/userguide/model/Person.java deleted file mode 100644 index e6dff50b62b8..000000000000 --- a/documentation/src/main/java/org/hibernate/userguide/model/Person.java +++ /dev/null @@ -1,269 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . - */ -package org.hibernate.userguide.model; - -import java.time.LocalDateTime; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import jakarta.persistence.CascadeType; -import jakarta.persistence.ColumnResult; -import jakarta.persistence.ConstructorResult; -import jakarta.persistence.ElementCollection; -import jakarta.persistence.Entity; -import jakarta.persistence.EntityResult; -import jakarta.persistence.EnumType; -import jakarta.persistence.FieldResult; -import jakarta.persistence.GeneratedValue; -import jakarta.persistence.Id; -import jakarta.persistence.MapKeyEnumerated; -import jakarta.persistence.NamedNativeQuery; -import jakarta.persistence.NamedQuery; -import jakarta.persistence.NamedStoredProcedureQuery; -import jakarta.persistence.OneToMany; -import jakarta.persistence.OrderColumn; -import jakarta.persistence.ParameterMode; -import jakarta.persistence.QueryHint; -import jakarta.persistence.SqlResultSetMapping; -import jakarta.persistence.StoredProcedureParameter; -import jakarta.persistence.Version; - -/** - * @author Vlad Mihalcea - */ -//tag::sql-scalar-NamedNativeQuery-example[] -@NamedNativeQuery( - name = "find_person_name", - query = - "SELECT name " + - "FROM Person ", - resultClass = String.class -) -//end::sql-scalar-NamedNativeQuery-example[] -//tag::sql-multiple-scalar-values-NamedNativeQuery-example[] -@NamedNativeQuery( - name = "find_person_name_and_nickName", - query = - "SELECT " + - " name, " + - " nickName " + - "FROM Person " -) -//end::sql-multiple-scalar-values-NamedNativeQuery-example[] -// tag::sql-multiple-scalar-values-dto-NamedNativeQuery-example[] -@NamedNativeQuery( - name = "find_person_name_and_nickName_dto", - query = - "select " + - " name, " + - " nickName " + - "from Person ", - resultSetMapping = "name_and_nickName_dto" -) -//end::sql-multiple-scalar-values-dto-NamedNativeQuery-example[] -//tag::sql-entity-NamedNativeQuery-example[] -@NamedNativeQuery( - name = "find_person_by_name", - query = - "select " + - " p.id AS \"id\", " + - " p.name AS \"name\", " + - " p.nickName AS \"nickName\", " + - " p.address AS \"address\", " + - " p.createdOn AS \"createdOn\", " + - " p.version AS \"version\" " + - "from Person p " + - "where p.name LIKE :name", - resultClass = Person.class -) -//end::sql-entity-NamedNativeQuery-example[] -//tag::sql-entity-associations-NamedNativeQuery-example[] -@NamedNativeQuery( - name = "find_person_with_phones_by_name", - query = - "select " + - " pr.id AS \"pr.id\", " + - " pr.name AS \"pr.name\", " + - " pr.nickName AS \"pr.nickName\", " + - " pr.address AS \"pr.address\", " + - " pr.createdOn AS \"pr.createdOn\", " + - " pr.version AS \"pr.version\", " + - " ph.id AS \"ph.id\", " + - " ph.person_id AS \"ph.person_id\", " + - " ph.phone_number AS \"ph.number\", " + - " ph.phone_type AS \"ph.type\" " + - "from Person pr " + - "join Phone ph ON pr.id = ph.person_id " + - "where pr.name LIKE :name", - resultSetMapping = "person_with_phones" -) -//end::sql-entity-associations-NamedNativeQuery-example[] -//tag::sql-entity-associations-NamedNativeQuery-example[] -@SqlResultSetMapping( - name = "person_with_phones", - entities = { - @EntityResult( - entityClass = Person.class, - fields = { - @FieldResult( name = "id", column = "pr.id" ), - @FieldResult( name = "name", column = "pr.name" ), - @FieldResult( name = "nickName", column = "pr.nickName" ), - @FieldResult( name = "address", column = "pr.address" ), - @FieldResult( name = "createdOn", column = "pr.createdOn" ), - @FieldResult( name = "version", column = "pr.version" ), - } - ), - @EntityResult( - entityClass = Phone.class, - fields = { - @FieldResult( name = "id", column = "ph.id" ), - @FieldResult( name = "person", column = "ph.person_id" ), - @FieldResult( name = "number", column = "ph.number" ), - @FieldResult( name = "type", column = "ph.type" ), - } - ) - } - ) -//end::sql-entity-associations-NamedNativeQuery-example[] -//tag::sql-multiple-scalar-values-dto-NamedNativeQuery-example[] -@SqlResultSetMapping( - name = "name_and_nickName_dto", - classes = @ConstructorResult( - targetClass = PersonNames.class, - columns = { - @ColumnResult(name = "name"), - @ColumnResult(name = "nickName") - } - ) -) -//end::sql-multiple-scalar-values-dto-NamedNativeQuery-example[] -//tag::hql-examples-domain-model-example[] -//tag::jpql-api-named-query-example[] -@NamedQuery( - name = "get_person_by_name", - query = "select p from Person p where name = :name" -) -//end::jpql-api-named-query-example[] -// tag::jpa-read-only-entities-native-example[] -@NamedQuery( - name = "get_read_only_person_by_name", - query = "select p from Person p where name = :name", - hints = { - @QueryHint( - name = "org.hibernate.readOnly", - value = "true" - ) - } -) -//end::jpa-read-only-entities-native-example[] -@NamedQuery( - name = "delete_person", - query = "delete Person" -) -//tag::sql-sp-ref-cursor-oracle-named-query-example[] -@NamedStoredProcedureQuery( - name = "sp_person_phones", - procedureName = "sp_person_phones", - parameters = { - @StoredProcedureParameter( - name = "personId", - type = Long.class, - mode = ParameterMode.IN - ), - @StoredProcedureParameter( - name = "personPhones", - type = Class.class, - mode = ParameterMode.REF_CURSOR - ) - } -) -//end::sql-sp-ref-cursor-oracle-named-query-example[] -@Entity -public class Person { - - @Id - @GeneratedValue - private Long id; - - private String name; - - private String nickName; - - private String address; - - private LocalDateTime createdOn; - - @OneToMany(mappedBy = "person", cascade = CascadeType.ALL) - @OrderColumn(name = "order_id") - private List phones = new ArrayList<>(); - - @ElementCollection - @MapKeyEnumerated(EnumType.STRING) - private Map addresses = new HashMap<>(); - - @Version - private int version; - - //Getters and setters are omitted for brevity - -//end::hql-examples-domain-model-example[] - - public Person() {} - - public Person(String name) { - this.name = name; - } - - public Long getId() { - return id; - } - - public String getName() { - return name; - } - - public String getNickName() { - return nickName; - } - - public void setNickName(String nickName) { - this.nickName = nickName; - } - - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - public LocalDateTime getCreatedOn() { - return createdOn; - } - - public void setCreatedOn(LocalDateTime createdOn) { - this.createdOn = createdOn; - } - - public List getPhones() { - return phones; - } - - public Map getAddresses() { - return addresses; - } - - public void addPhone(Phone phone) { - phones.add( phone ); - phone.setPerson( this ); - } -//tag::hql-examples-domain-model-example[] -} -//end::hql-examples-domain-model-example[] diff --git a/documentation/src/main/java/org/hibernate/userguide/model/PersonPhoneCount.java b/documentation/src/main/java/org/hibernate/userguide/model/PersonPhoneCount.java deleted file mode 100644 index e8cbe902c6c8..000000000000 --- a/documentation/src/main/java/org/hibernate/userguide/model/PersonPhoneCount.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . - */ -package org.hibernate.userguide.model; - -/** - * @author Vlad Mihalcea - */ -public class PersonPhoneCount { - - private final String name; - - private final Number phoneCount; - - public PersonPhoneCount(String name, Number phoneCount) { - this.name = name; - this.phoneCount = phoneCount; - } - - public String getName() { - return name; - } - - public Number getPhoneCount() { - return phoneCount; - } -} diff --git a/documentation/src/main/java/org/hibernate/userguide/model/Phone.java b/documentation/src/main/java/org/hibernate/userguide/model/Phone.java deleted file mode 100644 index 671ca8887ae8..000000000000 --- a/documentation/src/main/java/org/hibernate/userguide/model/Phone.java +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . - */ -package org.hibernate.userguide.model; - -import java.time.LocalDateTime; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import jakarta.persistence.CascadeType; -import jakarta.persistence.Column; -import jakarta.persistence.ColumnResult; -import jakarta.persistence.ConstructorResult; -import jakarta.persistence.ElementCollection; -import jakarta.persistence.Entity; -import jakarta.persistence.EnumType; -import jakarta.persistence.Enumerated; -import jakarta.persistence.FetchType; -import jakarta.persistence.Id; -import jakarta.persistence.ManyToOne; -import jakarta.persistence.MapKey; -import jakarta.persistence.OneToMany; -import jakarta.persistence.SqlResultSetMapping; - -import org.hibernate.annotations.NamedNativeQuery; -import org.hibernate.annotations.NamedQuery; - -/** - * @author Vlad Mihalcea - */ -//tag::jpql-api-hibernate-named-query-example[] -@NamedQuery( - name = "get_phone_by_number", - query = "select p " + - "from Phone p " + - "where p.number = :number", - timeout = 1, - readOnly = true -) -//end::jpql-api-hibernate-named-query-example[] -//tag::sql-multiple-scalar-values-dto-NamedNativeQuery-hibernate-example[] -@NamedNativeQuery( - name = "get_person_phone_count", - query = "select pr.name AS name, count(*) AS phoneCount " + - "from Phone p " + - "join Person pr ON pr.id = p.person_id " + - "group BY pr.name", - resultSetMapping = "person_phone_count", - timeout = 1, - readOnly = true -) -@SqlResultSetMapping( - name = "person_phone_count", - classes = @ConstructorResult( - targetClass = PersonPhoneCount.class, - columns = { - @ColumnResult(name = "name"), - @ColumnResult(name = "phoneCount") - } - ) -) -//end::sql-multiple-scalar-values-dto-NamedNativeQuery-hibernate-example[] -//tag::hql-examples-domain-model-example[] -@Entity -public class Phone { - - @Id - private Long id; - - @ManyToOne(fetch = FetchType.LAZY) - private Person person; - - @Column(name = "phone_number") - private String number; - - @Enumerated(EnumType.STRING) - @Column(name = "phone_type") - private PhoneType type; - - @OneToMany(mappedBy = "phone", cascade = CascadeType.ALL, orphanRemoval = true) - private List calls = new ArrayList<>( ); - - //tag::hql-collection-qualification-example[] - @OneToMany(mappedBy = "phone") - @MapKey(name = "timestamp") - private Map callHistory = new HashMap<>(); - //end::hql-collection-qualification-example[] - - @ElementCollection - private List repairTimestamps = new ArrayList<>( ); - - //Getters and setters are omitted for brevity - -//end::hql-examples-domain-model-example[] - public Phone() {} - - public Phone(String number) { - this.number = number; - } - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getNumber() { - return number; - } - - public Person getPerson() { - return person; - } - - public void setPerson(Person person) { - this.person = person; - } - - public PhoneType getType() { - return type; - } - - public void setType(PhoneType type) { - this.type = type; - } - - public List getCalls() { - return calls; - } - - public Map getCallHistory() { - return callHistory; - } - - public List getRepairTimestamps() { - return repairTimestamps; - } - - public void addCall(Call call) { - calls.add( call ); - callHistory.put( call.getTimestamp(), call ); - call.setPhone( this ); - } -//tag::hql-examples-domain-model-example[] -} -//end::hql-examples-domain-model-example[] diff --git a/documentation/src/test/java/org/hibernate/userguide/osgi/_native/HibernateUtil.java b/documentation/src/test/java/org/hibernate/userguide/osgi/_native/HibernateUtil.java deleted file mode 100644 index 474964a61c91..000000000000 --- a/documentation/src/test/java/org/hibernate/userguide/osgi/_native/HibernateUtil.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.hibernate.userguide.osgi._native; - -import org.hibernate.Session; -import org.hibernate.SessionFactory; - -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -//tag::osgi-discover-SessionFactory[] -public class HibernateUtil { - - private SessionFactory sf; - - public Session getSession() { - return getSessionFactory().openSession(); - } - - private SessionFactory getSessionFactory() { - if (sf == null) { - Bundle thisBundle = FrameworkUtil.getBundle( - HibernateUtil.class - ); - BundleContext context = thisBundle.getBundleContext(); - - ServiceReference sr = context.getServiceReference( - SessionFactory.class.getName() - ); - sf = (SessionFactory) context.getService(sr); - } - return sf; - } -} -//end::osgi-discover-SessionFactory[] \ No newline at end of file diff --git a/documentation/src/test/java/org/hibernate/userguide/osgi/jpa/HibernateUtil.java b/documentation/src/test/java/org/hibernate/userguide/osgi/jpa/HibernateUtil.java deleted file mode 100644 index e5b3211ec02f..000000000000 --- a/documentation/src/test/java/org/hibernate/userguide/osgi/jpa/HibernateUtil.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.hibernate.userguide.osgi.jpa; - -import jakarta.persistence.EntityManager; -import jakarta.persistence.EntityManagerFactory; -import jakarta.persistence.spi.PersistenceProvider; - -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -//tag::osgi-discover-EntityManagerFactory[] -public class HibernateUtil { - - private EntityManagerFactory emf; - - public EntityManager getEntityManager() { - return getEntityManagerFactory().createEntityManager(); - } - - private EntityManagerFactory getEntityManagerFactory() { - if (emf == null) { - Bundle thisBundle = FrameworkUtil.getBundle( - HibernateUtil.class - ); - BundleContext context = thisBundle.getBundleContext(); - - ServiceReference serviceReference = context.getServiceReference( - PersistenceProvider.class.getName() - ); - PersistenceProvider persistenceProvider = (PersistenceProvider) context - .getService( - serviceReference - ); - - emf = persistenceProvider.createEntityManagerFactory( - "YourPersistenceUnitName", - null - ); - } - return emf; - } -} -//end::osgi-discover-EntityManagerFactory[] diff --git a/documentation/src/test/resources/hibernate.properties b/documentation/src/test/resources/hibernate.properties deleted file mode 100644 index 968847a8f3f7..000000000000 --- a/documentation/src/test/resources/hibernate.properties +++ /dev/null @@ -1,25 +0,0 @@ -# -# Hibernate, Relational Persistence for Idiomatic Java -# -# License: GNU Lesser General Public License (LGPL), version 2.1 or later. -# See the lgpl.txt file in the root directory or . -# - -hibernate.dialect @db.dialect@ -hibernate.connection.driver_class @jdbc.driver@ -hibernate.connection.url @jdbc.url@ -hibernate.connection.username @jdbc.user@ -hibernate.connection.password @jdbc.pass@ -hibernate.connection.init_sql @connection.init_sql@ - -hibernate.connection.pool_size 5 - -hibernate.format_sql true -hibernate.max_fetch_depth 5 - -hibernate.cache.region_prefix hibernate.test -hibernate.cache.region.factory_class org.hibernate.testing.cache.CachingRegionFactory - -hibernate.jdbc.batch_size 0 - -hibernate.service.allow_crawling=false diff --git a/documentation/src/test/resources/log4j2.properties b/documentation/src/test/resources/log4j2.properties deleted file mode 100644 index 589c854e62e3..000000000000 --- a/documentation/src/test/resources/log4j2.properties +++ /dev/null @@ -1,94 +0,0 @@ -# -# Hibernate, Relational Persistence for Idiomatic Java -# -# License: GNU Lesser General Public License (LGPL), version 2.1 or later. -# See the lgpl.txt file in the root directory or . -# -appender.stdout.type=Console -appender.stdout.name=STDOUT -appender.stdout.layout.type=PatternLayout -appender.stdout.layout.pattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n - - -appender.subsystem.name=subsystem -appender.subsystem.type=Console -appender.subsystem.layout.type=PatternLayout -appender.subsystem.layout.pattern=[subsystem] %5p %15.25c{5} %C{1}:%L - %m%n - -logger.subsystem-root.name=org.hibernate.orm -logger.subsystem-root.level=info -logger.subsystem-root.additivity=false -logger.subsystem-root.appenderRef.subsystem.ref=subsystem - -logger.jdbc-bind.name=org.hibernate.orm.jdbc.bind -logger.jdbc-bind.level=trace - -logger.jdbc-extract.name=org.hibernate.orm.jdbc.extract -logger.jdbc-extract.level=trace - - - -rootLogger.level=info -rootLogger.appenderRef.stdout.ref=STDOUT - -logger.hibernate.name=org.hibernate -logger.hibernate.level=info -#logger.hibernate.level=warn - -logger.ejb.name=org.hibernate.ejb -logger.ejb.level=info -logger.ejb-packaging.name=org.hibernate.ejb.packaging -logger.ejb-packaging.level=info -logger.reflection.name=org.hibernate.reflection -logger.reflection.level=info - -logger.cascades.name=org.hibernate.engine.Cascades -#logger.cascades.level=warn - -### log just the SQL -logger.sql.name=org.hibernate.SQL -logger.sql.level=debug - -### log JDBC bind parameters ### -logger.hibernate-type.name=org.hibernate.type -logger.hibernate-type.level=trace -logger.type-sql.name=org.hibernate.type.descriptor.jdbc -logger.type-sql.level=trace -logger.table-generator.name=org.hibernate.id.enhanced.TableGenerator -logger.table-generator.level=trace -logger.identifier-generator-helper.name=org.hibernate.id.IdentifierGeneratorHelper -logger.identifier-generator-helper.level=trace -logger.abstract-entity-persister.name=org.hibernate.persister.entity.AbstractEntityPersister -logger.abstract-entity-persister.level=trace -logger.entity-reference-initializer-impl.name=org.hibernate.loader.plan.exec.process.internal.EntityReferenceInitializerImpl -logger.entity-reference-initializer-impl.level=trace - -### log schema export/update ### -logger.hbm2ddl.name=org.hibernate.tool.hbm2ddl -logger.hbm2ddl.level=info - -### log HQL parse trees -logger.hql.name=org.hibernate.hql -#logger.hql.level=warn - -### log cache activity ### -logger.cache.name=org.hibernate.cache -#logger.cache.level=warn - -### log JDBC resource acquisition -logger.hibernate-jdbc.name=org.hibernate.jdbc -#logger.hibernate-jdbc.level=warn - -### enable the following line if you want to track down connection ### -### leakages when using DriverManagerConnectionProvider ### -logger.driver-manager-connection-provider.name=org.hibernate.connection.DriverManagerConnectionProvider -#logger.driver-manager-connection-provider.level=trace - -### When entity copy merge functionality is enabled using: -### hibernate.event.merge.entity_copy_observer=log, the following will -### provide information about merged entity copies. -logger.entity-copy-allowed-logged-observer.name=org.hibernate.event.internal.EntityCopyAllowedLoggedObserver -#logger.entity-copy-allowed-logged-observer.level=warn - -logger.userguide.name=org.hibernate.userguide -logger.userguide.level=debug diff --git a/hibernate-core/hibernate-core.gradle b/hibernate-core/hibernate-core.gradle index d9eb88808252..15c5edc5987e 100644 --- a/hibernate-core/hibernate-core.gradle +++ b/hibernate-core/hibernate-core.gradle @@ -71,6 +71,7 @@ dependencies { testRuntimeOnly libs.byteBuddy testRuntimeOnly testLibs.weld testRuntimeOnly testLibs.wildFlyTxnClient + testRuntimeOnly jakartaLibs.jsonb testRuntimeOnly libs.jackson testRuntimeOnly libs.jacksonXml testRuntimeOnly libs.jacksonJsr310 diff --git a/documentation/src/test/java/org/hibernate/userguide/associations/BidirectionalTwoOneToManyMapsIdTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/BidirectionalTwoOneToManyMapsIdTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/associations/BidirectionalTwoOneToManyMapsIdTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/associations/BidirectionalTwoOneToManyMapsIdTest.java index fbf170d49839..3d4badec699c 100644 --- a/documentation/src/test/java/org/hibernate/userguide/associations/BidirectionalTwoOneToManyMapsIdTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/BidirectionalTwoOneToManyMapsIdTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.associations; +package org.hibernate.orm.test.associations; import java.io.Serializable; import java.util.ArrayList; diff --git a/documentation/src/test/java/org/hibernate/userguide/associations/CompositeIdAssociationTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/CompositeIdAssociationTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/associations/CompositeIdAssociationTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/associations/CompositeIdAssociationTest.java index a58659d73451..dfb75633a19c 100644 --- a/documentation/src/test/java/org/hibernate/userguide/associations/CompositeIdAssociationTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/CompositeIdAssociationTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.associations; +package org.hibernate.orm.test.associations; import java.io.Serializable; import java.util.Objects; diff --git a/documentation/src/test/java/org/hibernate/userguide/associations/DerivedIdentifierPrimaryKeyJoinColumnTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/DerivedIdentifierPrimaryKeyJoinColumnTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/associations/DerivedIdentifierPrimaryKeyJoinColumnTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/associations/DerivedIdentifierPrimaryKeyJoinColumnTest.java index ea319513a6d3..a59c4209f548 100644 --- a/documentation/src/test/java/org/hibernate/userguide/associations/DerivedIdentifierPrimaryKeyJoinColumnTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/DerivedIdentifierPrimaryKeyJoinColumnTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.associations; +package org.hibernate.orm.test.associations; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; diff --git a/documentation/src/test/java/org/hibernate/userguide/associations/DerivedIdentifierTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/DerivedIdentifierTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/associations/DerivedIdentifierTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/associations/DerivedIdentifierTest.java index 05bab602d183..0ff0775f91d0 100644 --- a/documentation/src/test/java/org/hibernate/userguide/associations/DerivedIdentifierTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/DerivedIdentifierTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.associations; +package org.hibernate.orm.test.associations; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; diff --git a/documentation/src/test/java/org/hibernate/userguide/associations/JoinColumnOrFormulaTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/JoinColumnOrFormulaTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/associations/JoinColumnOrFormulaTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/associations/JoinColumnOrFormulaTest.java index c8e1a843f562..26fdf569d6fd 100644 --- a/documentation/src/test/java/org/hibernate/userguide/associations/JoinColumnOrFormulaTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/JoinColumnOrFormulaTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.associations; +package org.hibernate.orm.test.associations; import java.io.Serializable; import java.util.Objects; diff --git a/documentation/src/test/java/org/hibernate/userguide/associations/JoinFormulaTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/JoinFormulaTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/associations/JoinFormulaTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/associations/JoinFormulaTest.java index 9c986f64cd2d..754f7142142f 100644 --- a/documentation/src/test/java/org/hibernate/userguide/associations/JoinFormulaTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/JoinFormulaTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.associations; +package org.hibernate.orm.test.associations; import java.util.Objects; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/associations/ManyToManyBidirectionalTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/ManyToManyBidirectionalTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/associations/ManyToManyBidirectionalTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/associations/ManyToManyBidirectionalTest.java index 16bfc1b06a5e..163f695d925e 100644 --- a/documentation/src/test/java/org/hibernate/userguide/associations/ManyToManyBidirectionalTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/ManyToManyBidirectionalTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.associations; +package org.hibernate.orm.test.associations; import java.util.ArrayList; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/associations/ManyToManyBidirectionalWithLinkEntityTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/ManyToManyBidirectionalWithLinkEntityTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/associations/ManyToManyBidirectionalWithLinkEntityTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/associations/ManyToManyBidirectionalWithLinkEntityTest.java index 4ad29f035e4a..7747bdafc7ef 100644 --- a/documentation/src/test/java/org/hibernate/userguide/associations/ManyToManyBidirectionalWithLinkEntityTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/ManyToManyBidirectionalWithLinkEntityTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.associations; +package org.hibernate.orm.test.associations; import java.io.Serializable; import java.util.ArrayList; diff --git a/documentation/src/test/java/org/hibernate/userguide/associations/ManyToManyUnidirectionalTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/ManyToManyUnidirectionalTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/associations/ManyToManyUnidirectionalTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/associations/ManyToManyUnidirectionalTest.java index 67120a5b773a..42f57d5a8821 100644 --- a/documentation/src/test/java/org/hibernate/userguide/associations/ManyToManyUnidirectionalTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/ManyToManyUnidirectionalTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.associations; +package org.hibernate.orm.test.associations; import java.util.ArrayList; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/associations/ManyToOneTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/ManyToOneTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/associations/ManyToOneTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/associations/ManyToOneTest.java index 6f536f99a1fb..17ede96ad87f 100644 --- a/documentation/src/test/java/org/hibernate/userguide/associations/ManyToOneTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/ManyToOneTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.associations; +package org.hibernate.orm.test.associations; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/associations/NotFoundTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/NotFoundTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/associations/NotFoundTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/associations/NotFoundTest.java index 32bfca74dc1b..946c5f4392f7 100644 --- a/documentation/src/test/java/org/hibernate/userguide/associations/NotFoundTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/NotFoundTest.java @@ -1,4 +1,4 @@ -package org.hibernate.userguide.associations; +package org.hibernate.orm.test.associations; import java.io.Serializable; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/associations/OneToManyBidirectionalTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/OneToManyBidirectionalTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/associations/OneToManyBidirectionalTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/associations/OneToManyBidirectionalTest.java index ca85ebff4ea9..703e7a9ea899 100644 --- a/documentation/src/test/java/org/hibernate/userguide/associations/OneToManyBidirectionalTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/OneToManyBidirectionalTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.associations; +package org.hibernate.orm.test.associations; import java.util.ArrayList; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/associations/OneToManyUnidirectionalTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/OneToManyUnidirectionalTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/associations/OneToManyUnidirectionalTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/associations/OneToManyUnidirectionalTest.java index 4a8d6d82adc7..fc5a2a99d5d1 100644 --- a/documentation/src/test/java/org/hibernate/userguide/associations/OneToManyUnidirectionalTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/OneToManyUnidirectionalTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.associations; +package org.hibernate.orm.test.associations; import java.util.ArrayList; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/associations/OneToOneBidirectionalLazyTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/OneToOneBidirectionalLazyTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/associations/OneToOneBidirectionalLazyTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/associations/OneToOneBidirectionalLazyTest.java index 84aecc70ab7a..5a31dd499391 100644 --- a/documentation/src/test/java/org/hibernate/userguide/associations/OneToOneBidirectionalLazyTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/OneToOneBidirectionalLazyTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.associations; +package org.hibernate.orm.test.associations; import jakarta.persistence.CascadeType; import jakarta.persistence.Column; diff --git a/documentation/src/test/java/org/hibernate/userguide/associations/OneToOneBidirectionalTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/OneToOneBidirectionalTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/associations/OneToOneBidirectionalTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/associations/OneToOneBidirectionalTest.java index aa41ad5455b0..1eae7522378c 100644 --- a/documentation/src/test/java/org/hibernate/userguide/associations/OneToOneBidirectionalTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/OneToOneBidirectionalTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.associations; +package org.hibernate.orm.test.associations; import jakarta.persistence.CascadeType; import jakarta.persistence.Column; diff --git a/documentation/src/test/java/org/hibernate/userguide/associations/OneToOneMapsIdTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/OneToOneMapsIdTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/associations/OneToOneMapsIdTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/associations/OneToOneMapsIdTest.java index 93da9088a3d8..4445f0b1a0cf 100644 --- a/documentation/src/test/java/org/hibernate/userguide/associations/OneToOneMapsIdTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/OneToOneMapsIdTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.associations; +package org.hibernate.orm.test.associations; import jakarta.persistence.Entity; import jakarta.persistence.Id; diff --git a/documentation/src/test/java/org/hibernate/userguide/associations/OneToOnePrimaryKeyJoinColumnTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/OneToOnePrimaryKeyJoinColumnTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/associations/OneToOnePrimaryKeyJoinColumnTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/associations/OneToOnePrimaryKeyJoinColumnTest.java index 3596ec6fcd10..a9a724042e18 100644 --- a/documentation/src/test/java/org/hibernate/userguide/associations/OneToOnePrimaryKeyJoinColumnTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/OneToOnePrimaryKeyJoinColumnTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.associations; +package org.hibernate.orm.test.associations; import jakarta.persistence.Entity; import jakarta.persistence.Id; diff --git a/documentation/src/test/java/org/hibernate/userguide/associations/OneToOneUnidirectionalTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/OneToOneUnidirectionalTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/associations/OneToOneUnidirectionalTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/associations/OneToOneUnidirectionalTest.java index 45ddeed418f2..715b120d69dc 100644 --- a/documentation/src/test/java/org/hibernate/userguide/associations/OneToOneUnidirectionalTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/OneToOneUnidirectionalTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.associations; +package org.hibernate.orm.test.associations; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/associations/UnidirectionalManyToManyRemoveTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/UnidirectionalManyToManyRemoveTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/associations/UnidirectionalManyToManyRemoveTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/associations/UnidirectionalManyToManyRemoveTest.java index 46bd74eb6731..2660deb1bcef 100644 --- a/documentation/src/test/java/org/hibernate/userguide/associations/UnidirectionalManyToManyRemoveTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/UnidirectionalManyToManyRemoveTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.associations; +package org.hibernate.orm.test.associations; import java.util.ArrayList; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/associations/any/AnyTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/any/AnyTest.java similarity index 97% rename from documentation/src/test/java/org/hibernate/userguide/associations/any/AnyTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/associations/any/AnyTest.java index 445a97d1ce3f..d8a530fdc4f2 100644 --- a/documentation/src/test/java/org/hibernate/userguide/associations/any/AnyTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/any/AnyTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.associations.any; +package org.hibernate.orm.test.associations.any; import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; import org.junit.Test; diff --git a/documentation/src/test/java/org/hibernate/userguide/associations/any/IntegerProperty.java b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/any/IntegerProperty.java similarity index 96% rename from documentation/src/test/java/org/hibernate/userguide/associations/any/IntegerProperty.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/associations/any/IntegerProperty.java index 4d28f57a04a9..1f9ee3844aa3 100644 --- a/documentation/src/test/java/org/hibernate/userguide/associations/any/IntegerProperty.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/any/IntegerProperty.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.associations.any; +package org.hibernate.orm.test.associations.any; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/associations/any/ManyToAnyTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/any/ManyToAnyTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/associations/any/ManyToAnyTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/associations/any/ManyToAnyTest.java index 866963587395..c2bad8c30234 100644 --- a/documentation/src/test/java/org/hibernate/userguide/associations/any/ManyToAnyTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/any/ManyToAnyTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.associations.any; +package org.hibernate.orm.test.associations.any; import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; import org.junit.Test; diff --git a/documentation/src/test/java/org/hibernate/userguide/associations/any/Property.java b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/any/Property.java similarity index 88% rename from documentation/src/test/java/org/hibernate/userguide/associations/any/Property.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/associations/any/Property.java index 9a27e8f1ecbf..0ce013e981ff 100644 --- a/documentation/src/test/java/org/hibernate/userguide/associations/any/Property.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/any/Property.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.associations.any; +package org.hibernate.orm.test.associations.any; //tag::associations-any-property-example[] public interface Property { diff --git a/documentation/src/test/java/org/hibernate/userguide/associations/any/PropertyDiscriminationDef.java b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/any/PropertyDiscriminationDef.java similarity index 95% rename from documentation/src/test/java/org/hibernate/userguide/associations/any/PropertyDiscriminationDef.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/associations/any/PropertyDiscriminationDef.java index 5fb4fd5bb06f..93426205d6a0 100644 --- a/documentation/src/test/java/org/hibernate/userguide/associations/any/PropertyDiscriminationDef.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/any/PropertyDiscriminationDef.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.associations.any; +package org.hibernate.orm.test.associations.any; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/documentation/src/test/java/org/hibernate/userguide/associations/any/PropertyHolder.java b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/any/PropertyHolder.java similarity index 96% rename from documentation/src/test/java/org/hibernate/userguide/associations/any/PropertyHolder.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/associations/any/PropertyHolder.java index 2b9327ce7857..2aa5a9920bac 100644 --- a/documentation/src/test/java/org/hibernate/userguide/associations/any/PropertyHolder.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/any/PropertyHolder.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.associations.any; +package org.hibernate.orm.test.associations.any; import org.hibernate.annotations.Any; import org.hibernate.annotations.AnyDiscriminator; diff --git a/documentation/src/test/java/org/hibernate/userguide/associations/any/PropertyHolder2.java b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/any/PropertyHolder2.java similarity index 95% rename from documentation/src/test/java/org/hibernate/userguide/associations/any/PropertyHolder2.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/associations/any/PropertyHolder2.java index 5e3481b7be29..67579d5e6bae 100644 --- a/documentation/src/test/java/org/hibernate/userguide/associations/any/PropertyHolder2.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/any/PropertyHolder2.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.associations.any; +package org.hibernate.orm.test.associations.any; import org.hibernate.annotations.Any; diff --git a/documentation/src/test/java/org/hibernate/userguide/associations/any/PropertyRepository.java b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/any/PropertyRepository.java similarity index 97% rename from documentation/src/test/java/org/hibernate/userguide/associations/any/PropertyRepository.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/associations/any/PropertyRepository.java index db06ea20d766..1362e9c9c2a0 100644 --- a/documentation/src/test/java/org/hibernate/userguide/associations/any/PropertyRepository.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/any/PropertyRepository.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.associations.any; +package org.hibernate.orm.test.associations.any; import java.util.ArrayList; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/associations/any/StringProperty.java b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/any/StringProperty.java similarity index 96% rename from documentation/src/test/java/org/hibernate/userguide/associations/any/StringProperty.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/associations/any/StringProperty.java index 35458e56f2d8..424b1a089d6c 100644 --- a/documentation/src/test/java/org/hibernate/userguide/associations/any/StringProperty.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/associations/any/StringProperty.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.associations.any; +package org.hibernate.orm.test.associations.any; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/batch/BatchTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/batch/BatchTests.java similarity index 94% rename from documentation/src/test/java/org/hibernate/userguide/batch/BatchTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/batch/BatchTests.java index 0201ba45ae31..525d7fadc79e 100644 --- a/documentation/src/test/java/org/hibernate/userguide/batch/BatchTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/batch/BatchTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.batch; +package org.hibernate.orm.test.batch; import jakarta.persistence.EntityManager; import jakarta.persistence.EntityTransaction; @@ -18,12 +18,12 @@ import org.hibernate.Transaction; import org.hibernate.orm.test.jpa.BaseEntityManagerFunctionalTestCase; import org.hibernate.resource.transaction.spi.TransactionStatus; -import org.hibernate.userguide.model.Account; -import org.hibernate.userguide.model.Call; -import org.hibernate.userguide.model.Partner; -import org.hibernate.userguide.model.Payment; -import org.hibernate.userguide.model.Person; -import org.hibernate.userguide.model.Phone; +import org.hibernate.testing.orm.domain.userguide.Account; +import org.hibernate.testing.orm.domain.userguide.Call; +import org.hibernate.testing.orm.domain.userguide.Partner; +import org.hibernate.testing.orm.domain.userguide.Payment; +import org.hibernate.testing.orm.domain.userguide.Person; +import org.hibernate.testing.orm.domain.userguide.Phone; import org.junit.Test; @@ -33,7 +33,7 @@ /** * @author Vlad Mihalcea */ -public class BatchTest extends BaseEntityManagerFunctionalTestCase { +public class BatchTests extends BaseEntityManagerFunctionalTestCase { @Override protected Class[] getAnnotatedClasses() { diff --git a/documentation/src/test/java/org/hibernate/userguide/bootstrap/BootstrapTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bootstrap/BootstrapTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/bootstrap/BootstrapTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/bootstrap/BootstrapTest.java index c36b24e2974b..5755e9d37ae6 100644 --- a/documentation/src/test/java/org/hibernate/userguide/bootstrap/BootstrapTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bootstrap/BootstrapTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.bootstrap; +package org.hibernate.orm.test.bootstrap; import java.io.File; import java.net.URL; @@ -42,10 +42,10 @@ import org.hibernate.jpa.HibernatePersistenceProvider; import org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl; import org.hibernate.jpa.boot.internal.PersistenceUnitInfoDescriptor; +import org.hibernate.orm.test.mapping.basic.bitset.BitSetType; +import org.hibernate.orm.test.mapping.basic.bitset.BitSetUserType; import org.hibernate.service.ServiceRegistry; import org.hibernate.service.spi.SessionFactoryServiceRegistry; -import org.hibernate.userguide.mapping.basic.bitset.BitSetType; -import org.hibernate.userguide.mapping.basic.bitset.BitSetUserType; import org.junit.Test; diff --git a/documentation/src/test/java/org/hibernate/userguide/events/BaseEntity.java b/hibernate-core/src/test/java/org/hibernate/orm/test/events/BaseEntity.java similarity index 74% rename from documentation/src/test/java/org/hibernate/userguide/events/BaseEntity.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/events/BaseEntity.java index a71a2e44ad4d..39dd80a083b5 100644 --- a/documentation/src/test/java/org/hibernate/userguide/events/BaseEntity.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/events/BaseEntity.java @@ -1,4 +1,10 @@ -package org.hibernate.userguide.events; +/* + * Hibernate, Relational Persistence for Idiomatic Java + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html + */ +package org.hibernate.orm.test.events; import java.sql.Timestamp; import jakarta.persistence.MappedSuperclass; diff --git a/documentation/src/test/java/org/hibernate/userguide/events/DefaultEntityListener-orm.xml b/hibernate-core/src/test/java/org/hibernate/orm/test/events/DefaultEntityListener-orm.xml similarity index 93% rename from documentation/src/test/java/org/hibernate/userguide/events/DefaultEntityListener-orm.xml rename to hibernate-core/src/test/java/org/hibernate/orm/test/events/DefaultEntityListener-orm.xml index 8f010c8eeca7..71008d518fc2 100644 --- a/documentation/src/test/java/org/hibernate/userguide/events/DefaultEntityListener-orm.xml +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/events/DefaultEntityListener-orm.xml @@ -16,7 +16,7 @@ + class="org.hibernate.orm.test.events.DefaultEntityListener"> diff --git a/documentation/src/test/java/org/hibernate/userguide/events/DefaultEntityListener.java b/hibernate-core/src/test/java/org/hibernate/orm/test/events/DefaultEntityListener.java similarity index 74% rename from documentation/src/test/java/org/hibernate/userguide/events/DefaultEntityListener.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/events/DefaultEntityListener.java index 42d8e006ce5b..820c1816b5b1 100644 --- a/documentation/src/test/java/org/hibernate/userguide/events/DefaultEntityListener.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/events/DefaultEntityListener.java @@ -1,4 +1,10 @@ -package org.hibernate.userguide.events; +/* + * Hibernate, Relational Persistence for Idiomatic Java + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html + */ +package org.hibernate.orm.test.events; import java.sql.Timestamp; import java.time.LocalDateTime; diff --git a/documentation/src/test/java/org/hibernate/userguide/events/DefaultEntityListenerTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/events/DefaultEntityListenerTest.java similarity index 97% rename from documentation/src/test/java/org/hibernate/userguide/events/DefaultEntityListenerTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/events/DefaultEntityListenerTest.java index e66205a2bf9a..42ca0fad7de0 100644 --- a/documentation/src/test/java/org/hibernate/userguide/events/DefaultEntityListenerTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/events/DefaultEntityListenerTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.events; +package org.hibernate.orm.test.events; import jakarta.persistence.Entity; import jakarta.persistence.ExcludeDefaultListeners; @@ -35,7 +35,7 @@ protected Class[] getAnnotatedClasses() { @Override protected String[] getMappings() { - return new String[] { "org/hibernate/userguide/events/DefaultEntityListener-orm.xml" }; + return new String[] { "org/hibernate/orm/test/events/DefaultEntityListener-orm.xml" }; } @Test diff --git a/documentation/src/test/java/org/hibernate/userguide/events/InterceptorTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/events/InterceptorTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/events/InterceptorTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/events/InterceptorTest.java index ed3a23f005e3..1ad65defbb4b 100644 --- a/documentation/src/test/java/org/hibernate/userguide/events/InterceptorTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/events/InterceptorTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.events; +package org.hibernate.orm.test.events; import java.io.Serializable; import java.util.Arrays; diff --git a/documentation/src/test/java/org/hibernate/userguide/events/ListenerTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/events/ListenerTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/events/ListenerTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/events/ListenerTest.java index 34681a7e8942..d2511d1f3d1f 100644 --- a/documentation/src/test/java/org/hibernate/userguide/events/ListenerTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/events/ListenerTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.events; +package org.hibernate.orm.test.events; import java.io.Serializable; import java.sql.Timestamp; diff --git a/documentation/src/test/java/org/hibernate/userguide/fetching/BatchFetchingTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/fetching/BatchFetchingTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/fetching/BatchFetchingTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/fetching/BatchFetchingTest.java index 090c608a4aa8..5b637c1669fa 100644 --- a/documentation/src/test/java/org/hibernate/userguide/fetching/BatchFetchingTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/fetching/BatchFetchingTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.fetching; +package org.hibernate.orm.test.fetching; import java.util.ArrayList; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/fetching/DirectVsQueryFetchingTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/fetching/DirectVsQueryFetchingTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/fetching/DirectVsQueryFetchingTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/fetching/DirectVsQueryFetchingTest.java index ab185eb38cdd..0789962a4def 100644 --- a/documentation/src/test/java/org/hibernate/userguide/fetching/DirectVsQueryFetchingTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/fetching/DirectVsQueryFetchingTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.fetching; +package org.hibernate.orm.test.fetching; import jakarta.persistence.Entity; import jakarta.persistence.FetchType; diff --git a/documentation/src/test/java/org/hibernate/userguide/fetching/FetchModeJoinTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/fetching/FetchModeJoinTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/fetching/FetchModeJoinTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/fetching/FetchModeJoinTest.java index 4389b9ca3f10..036522a9fcb1 100644 --- a/documentation/src/test/java/org/hibernate/userguide/fetching/FetchModeJoinTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/fetching/FetchModeJoinTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.fetching; +package org.hibernate.orm.test.fetching; import java.util.ArrayList; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/fetching/FetchModeSelectTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/fetching/FetchModeSelectTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/fetching/FetchModeSelectTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/fetching/FetchModeSelectTest.java index 78c00875ac17..69551aa6f594 100644 --- a/documentation/src/test/java/org/hibernate/userguide/fetching/FetchModeSelectTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/fetching/FetchModeSelectTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.fetching; +package org.hibernate.orm.test.fetching; import java.util.ArrayList; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/fetching/FetchModeSubselectTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/fetching/FetchModeSubselectTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/fetching/FetchModeSubselectTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/fetching/FetchModeSubselectTest.java index d4717120cdc1..9edb73a7c9ec 100644 --- a/documentation/src/test/java/org/hibernate/userguide/fetching/FetchModeSubselectTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/fetching/FetchModeSubselectTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.fetching; +package org.hibernate.orm.test.fetching; import java.util.ArrayList; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/fetching/FetchingTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/fetching/FetchingTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/fetching/FetchingTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/fetching/FetchingTest.java index b492407e085e..e6e633ebbe06 100644 --- a/documentation/src/test/java/org/hibernate/userguide/fetching/FetchingTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/fetching/FetchingTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.fetching; +package org.hibernate.orm.test.fetching; import java.util.ArrayList; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/fetching/GraphFetchingTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/fetching/GraphFetchingTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/fetching/GraphFetchingTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/fetching/GraphFetchingTest.java index be016e6f9d02..c61d69a71d0d 100644 --- a/documentation/src/test/java/org/hibernate/userguide/fetching/GraphFetchingTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/fetching/GraphFetchingTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.fetching; +package org.hibernate.orm.test.fetching; import java.util.ArrayList; import java.util.Collections; diff --git a/documentation/src/test/java/org/hibernate/userguide/fetching/GraphParsingTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/fetching/GraphParsingTest.java similarity index 93% rename from documentation/src/test/java/org/hibernate/userguide/fetching/GraphParsingTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/fetching/GraphParsingTest.java index 1a16b1e47abe..d80f99133bac 100644 --- a/documentation/src/test/java/org/hibernate/userguide/fetching/GraphParsingTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/fetching/GraphParsingTest.java @@ -1,4 +1,10 @@ -package org.hibernate.userguide.fetching; +/* + * Hibernate, Relational Persistence for Idiomatic Java + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html + */ +package org.hibernate.orm.test.fetching; import java.io.Serializable; import java.time.LocalDateTime; @@ -20,9 +26,9 @@ import org.hibernate.graph.GraphParser; import org.hibernate.graph.EntityGraphs; import org.hibernate.graph.GraphSemantic; -import org.hibernate.userguide.fetching.GraphFetchingTest.Department; -import org.hibernate.userguide.fetching.GraphFetchingTest.Employee; -import org.hibernate.userguide.fetching.GraphFetchingTest.Project; +import org.hibernate.orm.test.fetching.GraphFetchingTest.Department; +import org.hibernate.orm.test.fetching.GraphFetchingTest.Employee; +import org.hibernate.orm.test.fetching.GraphFetchingTest.Project; import org.hibernate.testing.RequiresDialect; import org.junit.Assert; diff --git a/documentation/src/test/java/org/hibernate/userguide/fetching/LazyCollectionTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/fetching/LazyCollectionTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/fetching/LazyCollectionTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/fetching/LazyCollectionTest.java index d1e118a5f79f..0ce1744e8a21 100644 --- a/documentation/src/test/java/org/hibernate/userguide/fetching/LazyCollectionTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/fetching/LazyCollectionTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.fetching; +package org.hibernate.orm.test.fetching; import java.util.ArrayList; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/fetching/ProfileFetchingTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/fetching/ProfileFetchingTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/fetching/ProfileFetchingTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/fetching/ProfileFetchingTest.java index 2fed0cc126b3..54504eac35cd 100644 --- a/documentation/src/test/java/org/hibernate/userguide/fetching/ProfileFetchingTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/fetching/ProfileFetchingTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.fetching; +package org.hibernate.orm.test.fetching; import java.util.ArrayList; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/flush/AlwaysFlushTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/flush/AlwaysFlushTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/flush/AlwaysFlushTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/flush/AlwaysFlushTest.java index 4355bd40e91b..2f8a87bafbd3 100644 --- a/documentation/src/test/java/org/hibernate/userguide/flush/AlwaysFlushTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/flush/AlwaysFlushTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.flush; +package org.hibernate.orm.test.flush; import java.util.ArrayList; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/flush/AutoFlushTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/flush/AutoFlushTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/flush/AutoFlushTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/flush/AutoFlushTest.java index 0af9a8614586..05d6dc96267b 100644 --- a/documentation/src/test/java/org/hibernate/userguide/flush/AutoFlushTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/flush/AutoFlushTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.flush; +package org.hibernate.orm.test.flush; import jakarta.persistence.Entity; import jakarta.persistence.EntityManager; diff --git a/documentation/src/test/java/org/hibernate/userguide/flush/CommitFlushTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/flush/CommitFlushTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/flush/CommitFlushTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/flush/CommitFlushTest.java index 6e20d3b5ec2d..b9db5a9eb0a4 100644 --- a/documentation/src/test/java/org/hibernate/userguide/flush/CommitFlushTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/flush/CommitFlushTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.flush; +package org.hibernate.orm.test.flush; import java.util.ArrayList; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/flush/FlushOrderTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/flush/FlushOrderTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/flush/FlushOrderTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/flush/FlushOrderTest.java index 33b798d26095..b80ab648794b 100644 --- a/documentation/src/test/java/org/hibernate/userguide/flush/FlushOrderTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/flush/FlushOrderTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.flush; +package org.hibernate.orm.test.flush; import jakarta.persistence.Entity; import jakarta.persistence.Id; diff --git a/documentation/src/test/java/org/hibernate/userguide/flush/HibernateAutoFlushTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/flush/HibernateAutoFlushTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/flush/HibernateAutoFlushTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/flush/HibernateAutoFlushTest.java index 1deae65b4677..9e8a92ff875b 100644 --- a/documentation/src/test/java/org/hibernate/userguide/flush/HibernateAutoFlushTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/flush/HibernateAutoFlushTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.flush; +package org.hibernate.orm.test.flush; import jakarta.persistence.Entity; import jakarta.persistence.EntityManager; diff --git a/documentation/src/test/java/org/hibernate/userguide/flush/ManualFlushTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/flush/ManualFlushTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/flush/ManualFlushTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/flush/ManualFlushTest.java index 5ce66b3d3e90..466d2c562fd5 100644 --- a/documentation/src/test/java/org/hibernate/userguide/flush/ManualFlushTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/flush/ManualFlushTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.flush; +package org.hibernate.orm.test.flush; import java.util.ArrayList; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/hql/CallStatistics.java b/hibernate-core/src/test/java/org/hibernate/orm/test/hql/CallStatistics.java similarity index 95% rename from documentation/src/test/java/org/hibernate/userguide/hql/CallStatistics.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/hql/CallStatistics.java index 34c1ff4a6680..b36297040f4a 100644 --- a/documentation/src/test/java/org/hibernate/userguide/hql/CallStatistics.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/hql/CallStatistics.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.hql; +package org.hibernate.orm.test.hql; /** * @author Vlad Mihalcea diff --git a/documentation/src/test/java/org/hibernate/userguide/hql/HQLTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/hql/HQLTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/hql/HQLTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/hql/HQLTest.java index 4e2436c62799..45969f702882 100644 --- a/documentation/src/test/java/org/hibernate/userguide/hql/HQLTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/hql/HQLTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.hql; +package org.hibernate.orm.test.hql; import java.math.BigDecimal; import java.time.Instant; @@ -36,21 +36,22 @@ import org.hibernate.orm.test.jpa.BaseEntityManagerFunctionalTestCase; import org.hibernate.query.QueryProducer; import org.hibernate.type.StandardBasicTypes; -import org.hibernate.userguide.model.Account; -import org.hibernate.userguide.model.AddressType; -import org.hibernate.userguide.model.Call; -import org.hibernate.userguide.model.CreditCardPayment; -import org.hibernate.userguide.model.Payment; -import org.hibernate.userguide.model.Person; -import org.hibernate.userguide.model.PersonNames; -import org.hibernate.userguide.model.Phone; -import org.hibernate.userguide.model.PhoneType; -import org.hibernate.userguide.model.WireTransferPayment; +import org.hibernate.testing.orm.domain.userguide.Account; +import org.hibernate.testing.orm.domain.userguide.AddressType; +import org.hibernate.testing.orm.domain.userguide.Call; +import org.hibernate.testing.orm.domain.userguide.CreditCardPayment; +import org.hibernate.testing.orm.domain.userguide.Payment; +import org.hibernate.testing.orm.domain.userguide.Person; +import org.hibernate.testing.orm.domain.userguide.PersonNames; +import org.hibernate.testing.orm.domain.userguide.Phone; +import org.hibernate.testing.orm.domain.userguide.PhoneType; +import org.hibernate.testing.orm.domain.userguide.WireTransferPayment; import org.hibernate.testing.RequiresDialect; import org.hibernate.testing.orm.junit.SkipForDialect; import org.hibernate.testing.DialectChecks; import org.hibernate.testing.RequiresDialectFeature; +import org.junit.Assert; import org.junit.Before; import org.junit.Test; @@ -280,7 +281,7 @@ public void hql_select_simplest_jpql_fqn_example() { //tag::hql-select-simplest-jpql-fqn-example[] List persons = entityManager.createQuery( "select p " + - "from org.hibernate.userguide.model.Person p", + "from org.hibernate.testing.orm.domain.userguide.Person p", Person.class) .getResultList(); //end::hql-select-simplest-jpql-fqn-example[] @@ -572,7 +573,7 @@ public void test_hql_collection_valued_associations_1() { .getResultList(); //end::hql-collection-valued-associations[] assertEquals(1, phones.size()); - assertEquals("123-456-7890", phones.get(0).getNumber()); + assertEquals( "123-456-7890", phones.get( 0).getNumber()); }); } @@ -601,7 +602,7 @@ public void test_hql_collection_valued_associations_2() { .getResultList(); //end::ejb-collection-valued-associations[] assertEquals(1, phones.size()); - assertEquals("123-456-7890", phones.get(0).getNumber()); + assertEquals( "123-456-7890", phones.get( 0).getNumber()); }); } @@ -2341,7 +2342,7 @@ public void test_hql_select_clause_dynamic_instantiation_example() { doInJPA(this::entityManagerFactory, entityManager -> { //tag::hql-select-clause-dynamic-instantiation-example[] CallStatistics callStatistics = entityManager.createQuery( - "select new org.hibernate.userguide.hql.CallStatistics(" + + "select new org.hibernate.orm.test.hql.CallStatistics(" + " count(c), " + " sum(c.duration), " + " min(c.duration), " + diff --git a/documentation/src/test/java/org/hibernate/userguide/hql/MutationQueryExampleTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/hql/MutationQueryExampleTests.java similarity index 85% rename from documentation/src/test/java/org/hibernate/userguide/hql/MutationQueryExampleTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/hql/MutationQueryExampleTests.java index e9dd80096edc..c2b4e7a9ef85 100644 --- a/documentation/src/test/java/org/hibernate/userguide/hql/MutationQueryExampleTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/hql/MutationQueryExampleTests.java @@ -4,17 +4,16 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.hql; +package org.hibernate.orm.test.hql; +import org.hibernate.testing.orm.domain.userguide.Account; +import org.hibernate.testing.orm.domain.userguide.Call; +import org.hibernate.testing.orm.domain.userguide.CreditCardPayment; +import org.hibernate.testing.orm.domain.userguide.Person; +import org.hibernate.testing.orm.domain.userguide.Phone; +import org.hibernate.testing.orm.domain.userguide.WireTransferPayment; import org.hibernate.query.MutationQuery; import org.hibernate.query.Query; -import org.hibernate.query.SelectionQuery; -import org.hibernate.userguide.model.Account; -import org.hibernate.userguide.model.Call; -import org.hibernate.userguide.model.CreditCardPayment; -import org.hibernate.userguide.model.Person; -import org.hibernate.userguide.model.Phone; -import org.hibernate.userguide.model.WireTransferPayment; import org.hibernate.testing.orm.junit.DomainModel; import org.hibernate.testing.orm.junit.FailureExpected; diff --git a/documentation/src/test/java/org/hibernate/userguide/hql/PostgreSQLFunctionSelectClauseTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/hql/PostgreSQLFunctionSelectClauseTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/hql/PostgreSQLFunctionSelectClauseTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/hql/PostgreSQLFunctionSelectClauseTest.java index ba8d72922cc5..5078c8628f43 100644 --- a/documentation/src/test/java/org/hibernate/userguide/hql/PostgreSQLFunctionSelectClauseTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/hql/PostgreSQLFunctionSelectClauseTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.hql; +package org.hibernate.orm.test.hql; import java.sql.Statement; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/hql/PostgreSQLFunctionWhereClauseTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/hql/PostgreSQLFunctionWhereClauseTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/hql/PostgreSQLFunctionWhereClauseTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/hql/PostgreSQLFunctionWhereClauseTest.java index e64f4d0b525b..954af74e10ee 100644 --- a/documentation/src/test/java/org/hibernate/userguide/hql/PostgreSQLFunctionWhereClauseTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/hql/PostgreSQLFunctionWhereClauseTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.hql; +package org.hibernate.orm.test.hql; import java.sql.Statement; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/hql/SelectDistinctTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/hql/SelectDistinctTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/hql/SelectDistinctTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/hql/SelectDistinctTest.java index 55f4c33f1585..eac10371bd7e 100644 --- a/documentation/src/test/java/org/hibernate/userguide/hql/SelectDistinctTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/hql/SelectDistinctTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.hql; +package org.hibernate.orm.test.hql; import java.util.ArrayList; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/hql/SelectionQueryExampleTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/hql/SelectionQueryExampleTests.java similarity index 85% rename from documentation/src/test/java/org/hibernate/userguide/hql/SelectionQueryExampleTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/hql/SelectionQueryExampleTests.java index a5ff8844375c..c326e896057d 100644 --- a/documentation/src/test/java/org/hibernate/userguide/hql/SelectionQueryExampleTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/hql/SelectionQueryExampleTests.java @@ -4,17 +4,16 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.hql; +package org.hibernate.orm.test.hql; +import org.hibernate.testing.orm.domain.userguide.Account; +import org.hibernate.testing.orm.domain.userguide.Call; +import org.hibernate.testing.orm.domain.userguide.CreditCardPayment; +import org.hibernate.testing.orm.domain.userguide.Person; +import org.hibernate.testing.orm.domain.userguide.Phone; +import org.hibernate.testing.orm.domain.userguide.WireTransferPayment; import org.hibernate.query.Query; import org.hibernate.query.SelectionQuery; -import org.hibernate.query.spi.QueryImplementor; -import org.hibernate.userguide.model.Account; -import org.hibernate.userguide.model.Call; -import org.hibernate.userguide.model.CreditCardPayment; -import org.hibernate.userguide.model.Person; -import org.hibernate.userguide.model.Phone; -import org.hibernate.userguide.model.WireTransferPayment; import org.hibernate.testing.orm.junit.DomainModel; import org.hibernate.testing.orm.junit.FailureExpected; diff --git a/documentation/src/test/java/org/hibernate/userguide/inheritance/DiscriminatorNotNullSingleTableTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/DiscriminatorNotNullSingleTableTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/inheritance/DiscriminatorNotNullSingleTableTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/DiscriminatorNotNullSingleTableTest.java index aad684a7f090..441973960cb9 100644 --- a/documentation/src/test/java/org/hibernate/userguide/inheritance/DiscriminatorNotNullSingleTableTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/DiscriminatorNotNullSingleTableTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.inheritance; +package org.hibernate.orm.test.inheritance; import java.math.BigDecimal; import java.sql.Statement; diff --git a/documentation/src/test/java/org/hibernate/userguide/inheritance/DiscriminatorOptionsNotNullSingleTableTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/DiscriminatorOptionsNotNullSingleTableTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/inheritance/DiscriminatorOptionsNotNullSingleTableTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/DiscriminatorOptionsNotNullSingleTableTest.java index 32a005f27055..932daf40d4f5 100644 --- a/documentation/src/test/java/org/hibernate/userguide/inheritance/DiscriminatorOptionsNotNullSingleTableTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/DiscriminatorOptionsNotNullSingleTableTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.inheritance; +package org.hibernate.orm.test.inheritance; import java.math.BigDecimal; import java.sql.Statement; diff --git a/documentation/src/test/java/org/hibernate/userguide/inheritance/JoinTablePrimaryKeyJoinColumnTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/JoinTablePrimaryKeyJoinColumnTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/inheritance/JoinTablePrimaryKeyJoinColumnTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/JoinTablePrimaryKeyJoinColumnTest.java index 7c46aa63f90f..2780309fbf83 100644 --- a/documentation/src/test/java/org/hibernate/userguide/inheritance/JoinTablePrimaryKeyJoinColumnTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/JoinTablePrimaryKeyJoinColumnTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.inheritance; +package org.hibernate.orm.test.inheritance; import java.math.BigDecimal; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/inheritance/JoinTableTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/JoinTableTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/inheritance/JoinTableTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/JoinTableTest.java index 1f1b9f808107..b2646d67665e 100644 --- a/documentation/src/test/java/org/hibernate/userguide/inheritance/JoinTableTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/JoinTableTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.inheritance; +package org.hibernate.orm.test.inheritance; import java.math.BigDecimal; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/inheritance/MappedSuperclassTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/MappedSuperclassTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/inheritance/MappedSuperclassTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/MappedSuperclassTest.java index 309a31f953b7..64940df0cf6c 100644 --- a/documentation/src/test/java/org/hibernate/userguide/inheritance/MappedSuperclassTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/MappedSuperclassTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.inheritance; +package org.hibernate.orm.test.inheritance; import java.math.BigDecimal; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/inheritance/SingleTableDiscriminatorFormulaTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/SingleTableDiscriminatorFormulaTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/inheritance/SingleTableDiscriminatorFormulaTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/SingleTableDiscriminatorFormulaTest.java index b78262d1f10c..5590fe9ecfb2 100644 --- a/documentation/src/test/java/org/hibernate/userguide/inheritance/SingleTableDiscriminatorFormulaTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/SingleTableDiscriminatorFormulaTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.inheritance; +package org.hibernate.orm.test.inheritance; import java.math.BigDecimal; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/inheritance/SingleTableTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/SingleTableTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/inheritance/SingleTableTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/SingleTableTest.java index 07c6c89a1c9a..4d4d6d171cd4 100644 --- a/documentation/src/test/java/org/hibernate/userguide/inheritance/SingleTableTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/SingleTableTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.inheritance; +package org.hibernate.orm.test.inheritance; import java.math.BigDecimal; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/inheritance/TablePerClassTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/TablePerClassTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/inheritance/TablePerClassTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/TablePerClassTest.java index 80aba00e87e8..cf486cfacaa9 100644 --- a/documentation/src/test/java/org/hibernate/userguide/inheritance/TablePerClassTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/TablePerClassTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.inheritance; +package org.hibernate.orm.test.inheritance; import java.math.BigDecimal; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/inheritance/polymorphism/DomainModelEntity.java b/hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/polymorphism/DomainModelEntity.java similarity index 89% rename from documentation/src/test/java/org/hibernate/userguide/inheritance/polymorphism/DomainModelEntity.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/polymorphism/DomainModelEntity.java index 2e3a99005e0d..a8d1e70a8f08 100644 --- a/documentation/src/test/java/org/hibernate/userguide/inheritance/polymorphism/DomainModelEntity.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/polymorphism/DomainModelEntity.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.inheritance.polymorphism; +package org.hibernate.orm.test.inheritance.polymorphism; /** * @author Vlad Mihalcea diff --git a/documentation/src/test/java/org/hibernate/userguide/inheritance/polymorphism/ExplicitPolymorphismTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/polymorphism/ExplicitPolymorphismTest.java similarity index 96% rename from documentation/src/test/java/org/hibernate/userguide/inheritance/polymorphism/ExplicitPolymorphismTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/polymorphism/ExplicitPolymorphismTest.java index cd08954f98df..d215d10d8a8f 100644 --- a/documentation/src/test/java/org/hibernate/userguide/inheritance/polymorphism/ExplicitPolymorphismTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/polymorphism/ExplicitPolymorphismTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.inheritance.polymorphism; +package org.hibernate.orm.test.inheritance.polymorphism; import java.util.List; import jakarta.persistence.Entity; @@ -56,7 +56,7 @@ public void test() { List accounts = entityManager .createQuery( "select e " + - "from org.hibernate.userguide.inheritance.polymorphism.DomainModelEntity e") + "from org.hibernate.orm.test.inheritance.polymorphism.DomainModelEntity e") .getResultList(); assertEquals(1, accounts.size()); diff --git a/documentation/src/test/java/org/hibernate/userguide/locking/ExplicitLockingTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/locking/ExplicitLockingTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/locking/ExplicitLockingTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/locking/ExplicitLockingTest.java index a80a66855700..4aa8cada7a06 100644 --- a/documentation/src/test/java/org/hibernate/userguide/locking/ExplicitLockingTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/locking/ExplicitLockingTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.locking; +package org.hibernate.orm.test.locking; import java.util.ArrayList; import java.util.Collections; diff --git a/documentation/src/test/java/org/hibernate/userguide/locking/OptimisticLockTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/locking/OptimisticLockTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/locking/OptimisticLockTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/locking/OptimisticLockTest.java index 7a985dd0d7bc..006865240519 100644 --- a/documentation/src/test/java/org/hibernate/userguide/locking/OptimisticLockTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/locking/OptimisticLockTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.locking; +package org.hibernate.orm.test.locking; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/locking/OptimisticLockTypeAllTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/locking/OptimisticLockTypeAllTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/locking/OptimisticLockTypeAllTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/locking/OptimisticLockTypeAllTest.java index 759241b299d3..d4a5c67d3646 100644 --- a/documentation/src/test/java/org/hibernate/userguide/locking/OptimisticLockTypeAllTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/locking/OptimisticLockTypeAllTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.locking; +package org.hibernate.orm.test.locking; import java.sql.Timestamp; import jakarta.persistence.Column; diff --git a/documentation/src/test/java/org/hibernate/userguide/locking/OptimisticLockTypeDirtyTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/locking/OptimisticLockTypeDirtyTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/locking/OptimisticLockTypeDirtyTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/locking/OptimisticLockTypeDirtyTest.java index 9b379d10aede..86f36f850598 100644 --- a/documentation/src/test/java/org/hibernate/userguide/locking/OptimisticLockTypeDirtyTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/locking/OptimisticLockTypeDirtyTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.locking; +package org.hibernate.orm.test.locking; import java.sql.Timestamp; import jakarta.persistence.Column; diff --git a/documentation/src/test/java/org/hibernate/userguide/locking/OptimisticLockingInstantTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/locking/OptimisticLockingInstantTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/locking/OptimisticLockingInstantTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/locking/OptimisticLockingInstantTest.java index 31598d22d337..721d30ee5907 100644 --- a/documentation/src/test/java/org/hibernate/userguide/locking/OptimisticLockingInstantTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/locking/OptimisticLockingInstantTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.locking; +package org.hibernate.orm.test.locking; import java.time.Instant; import jakarta.persistence.Column; diff --git a/documentation/src/test/java/org/hibernate/userguide/locking/OptimisticLockingTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/locking/OptimisticLockingTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/locking/OptimisticLockingTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/locking/OptimisticLockingTest.java index 627fec955feb..fcbcd50abece 100644 --- a/documentation/src/test/java/org/hibernate/userguide/locking/OptimisticLockingTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/locking/OptimisticLockingTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.locking; +package org.hibernate.orm.test.locking; import java.util.Date; import jakarta.persistence.Column; diff --git a/documentation/src/test/java/org/hibernate/userguide/locking/OptimisticLockingTimestampTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/locking/OptimisticLockingTimestampTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/locking/OptimisticLockingTimestampTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/locking/OptimisticLockingTimestampTest.java index fcc0a46bce0d..76197e4dfb45 100644 --- a/documentation/src/test/java/org/hibernate/userguide/locking/OptimisticLockingTimestampTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/locking/OptimisticLockingTimestampTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.locking; +package org.hibernate.orm.test.locking; import java.sql.Timestamp; import jakarta.persistence.Column; diff --git a/documentation/src/test/java/org/hibernate/userguide/locking/VersionSourceTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/locking/VersionSourceTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/locking/VersionSourceTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/locking/VersionSourceTest.java index c7af2d8f0a19..ebe8ebeb2c46 100644 --- a/documentation/src/test/java/org/hibernate/userguide/locking/VersionSourceTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/locking/VersionSourceTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.locking; +package org.hibernate.orm.test.locking; import jakarta.persistence.Entity; import jakarta.persistence.Id; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/access/ElementCollectionAccessTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/access/ElementCollectionAccessTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/access/ElementCollectionAccessTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/access/ElementCollectionAccessTest.java index 5254b09698b8..42d72b063c20 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/access/ElementCollectionAccessTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/access/ElementCollectionAccessTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.mapping.access; +package org.hibernate.orm.test.mapping.access; import java.util.ArrayList; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/access/EmbeddableAccessTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/access/EmbeddableAccessTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/access/EmbeddableAccessTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/access/EmbeddableAccessTest.java index cfdd691f2126..bf565960e8b7 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/access/EmbeddableAccessTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/access/EmbeddableAccessTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.mapping.access; +package org.hibernate.orm.test.mapping.access; import jakarta.persistence.Access; import jakarta.persistence.AccessType; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/access/FieldAccessTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/access/FieldAccessTest.java similarity index 97% rename from documentation/src/test/java/org/hibernate/userguide/mapping/access/FieldAccessTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/access/FieldAccessTest.java index b0185f9b0b96..3bb572216f6e 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/access/FieldAccessTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/access/FieldAccessTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.mapping.access; +package org.hibernate.orm.test.mapping.access; import jakarta.persistence.Entity; import jakarta.persistence.Id; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/access/PropertyAccessOverrideTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/access/PropertyAccessOverrideTest.java similarity index 97% rename from documentation/src/test/java/org/hibernate/userguide/mapping/access/PropertyAccessOverrideTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/access/PropertyAccessOverrideTest.java index 46bf0de3be92..66b5ff81df31 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/access/PropertyAccessOverrideTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/access/PropertyAccessOverrideTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.mapping.access; +package org.hibernate.orm.test.mapping.access; import jakarta.persistence.Access; import jakarta.persistence.AccessType; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/access/PropertyAccessTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/access/PropertyAccessTest.java similarity index 96% rename from documentation/src/test/java/org/hibernate/userguide/mapping/access/PropertyAccessTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/access/PropertyAccessTest.java index 6f3acecd3ccc..7338d4690dcb 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/access/PropertyAccessTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/access/PropertyAccessTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.mapping.access; +package org.hibernate.orm.test.mapping.access; import jakarta.persistence.Entity; import jakarta.persistence.Id; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/AutoQuotingTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/AutoQuotingTest.java similarity index 97% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/AutoQuotingTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/AutoQuotingTest.java index 9e45b4c706af..a027e70f9e85 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/AutoQuotingTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/AutoQuotingTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.util.Map; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/BasicArrayMappingTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/BasicArrayMappingTests.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/BasicArrayMappingTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/BasicArrayMappingTests.java index 3220b3e31029..2fdf2ce3f642 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/BasicArrayMappingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/BasicArrayMappingTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import org.hibernate.metamodel.mapping.JdbcMapping; import org.hibernate.metamodel.mapping.internal.BasicAttributeMapping; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/BasicCollectionMappingTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/BasicCollectionMappingTests.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/BasicCollectionMappingTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/BasicCollectionMappingTests.java index 7590a7491900..8a1a1277de41 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/BasicCollectionMappingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/BasicCollectionMappingTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.util.ArrayList; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/BigDecimalMappingTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/BigDecimalMappingTests.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/BigDecimalMappingTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/BigDecimalMappingTests.java index b0172ce5fc1f..50e1dae2f89f 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/BigDecimalMappingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/BigDecimalMappingTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.math.BigDecimal; import java.sql.Types; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/BigIntegerMappingTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/BigIntegerMappingTests.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/BigIntegerMappingTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/BigIntegerMappingTests.java index e6c1c9ca20b8..24f236d0d562 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/BigIntegerMappingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/BigIntegerMappingTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.math.BigInteger; import java.sql.Types; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/BlobByteArrayTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/BlobByteArrayTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/BlobByteArrayTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/BlobByteArrayTest.java index cacdae5a81ff..7627ce329283 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/BlobByteArrayTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/BlobByteArrayTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import jakarta.persistence.Entity; import jakarta.persistence.Id; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/BlobTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/BlobTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/BlobTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/BlobTest.java index 2dc3d64ab63b..63f193930581 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/BlobTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/BlobTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.io.BufferedInputStream; import java.io.ByteArrayOutputStream; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/BooleanMappingTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/BooleanMappingTests.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/BooleanMappingTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/BooleanMappingTests.java index 54b664772b71..6a51d9e01133 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/BooleanMappingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/BooleanMappingTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.sql.Types; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/ByteArrayMappingTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ByteArrayMappingTests.java similarity index 97% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/ByteArrayMappingTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ByteArrayMappingTests.java index 0dafbc60d884..5fb3aecfa42f 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/ByteArrayMappingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ByteArrayMappingTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.sql.Types; import jakarta.persistence.Entity; @@ -12,7 +12,6 @@ import jakarta.persistence.Lob; import jakarta.persistence.Table; -import org.hibernate.metamodel.MappingMetamodel; import org.hibernate.metamodel.mapping.JdbcMapping; import org.hibernate.metamodel.mapping.internal.BasicAttributeMapping; import org.hibernate.metamodel.spi.MappingMetamodelImplementor; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/ByteMappingTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ByteMappingTests.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/ByteMappingTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ByteMappingTests.java index 1bc34295809b..e0630bf7f8b9 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/ByteMappingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ByteMappingTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.sql.Types; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/CalendarWithTemporalTimestampTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/CalendarWithTemporalTimestampTest.java similarity index 91% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/CalendarWithTemporalTimestampTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/CalendarWithTemporalTimestampTest.java index 24a09e83cd65..3f98a3284f4a 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/CalendarWithTemporalTimestampTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/CalendarWithTemporalTimestampTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.util.Calendar; import java.util.GregorianCalendar; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/CharacterArrayMappingTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/CharacterArrayMappingTests.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/CharacterArrayMappingTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/CharacterArrayMappingTests.java index 856a1b0eb1a0..8abbb9f3035f 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/CharacterArrayMappingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/CharacterArrayMappingTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.sql.Types; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/CharacterArrayNationalizedMappingTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/CharacterArrayNationalizedMappingTests.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/CharacterArrayNationalizedMappingTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/CharacterArrayNationalizedMappingTests.java index 01ceb66b8bbd..b0785ab17103 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/CharacterArrayNationalizedMappingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/CharacterArrayNationalizedMappingTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import jakarta.persistence.Entity; import jakarta.persistence.Id; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/CharacterMappingTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/CharacterMappingTests.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/CharacterMappingTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/CharacterMappingTests.java index a42f275d13f4..f73bfdaa6d35 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/CharacterMappingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/CharacterMappingTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.sql.Types; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/ClassMappingTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ClassMappingTests.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/ClassMappingTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ClassMappingTests.java index 50eb3bca9b48..8355f802b3fe 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/ClassMappingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ClassMappingTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.sql.Types; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/ClobCharArrayTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ClobCharArrayTest.java similarity index 90% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/ClobCharArrayTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ClobCharArrayTest.java index fe7f052e07c1..b4bd6f919302 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/ClobCharArrayTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ClobCharArrayTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import jakarta.persistence.Entity; import jakarta.persistence.Id; @@ -12,7 +12,6 @@ import org.hibernate.testing.orm.junit.EntityManagerFactoryScope; import org.hibernate.testing.orm.junit.Jpa; -import org.hibernate.testing.orm.junit.SessionFactoryScope; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Test; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/ClobStringTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ClobStringTest.java similarity index 92% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/ClobStringTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ClobStringTest.java index 65f82282473c..01b6e5c561f5 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/ClobStringTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ClobStringTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import jakarta.persistence.Entity; import jakarta.persistence.Id; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/ClobTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ClobTest.java similarity index 95% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/ClobTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ClobTest.java index 98514554c9a0..3f012ad2ea8b 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/ClobTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ClobTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.io.BufferedReader; import java.io.ByteArrayOutputStream; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/ColumnTransformerTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ColumnTransformerTest.java similarity index 94% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/ColumnTransformerTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ColumnTransformerTest.java index 4d7006ee2af6..0e8a444101c9 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/ColumnTransformerTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ColumnTransformerTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.math.BigDecimal; import java.util.Currency; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/CurrencyMappingTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/CurrencyMappingTests.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/CurrencyMappingTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/CurrencyMappingTests.java index f288d989892d..6aed0cd0cb27 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/CurrencyMappingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/CurrencyMappingTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.sql.Types; import java.util.Currency; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/CustomBinaryJdbcType.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/CustomBinaryJdbcType.java similarity index 95% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/CustomBinaryJdbcType.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/CustomBinaryJdbcType.java index 5f3dd95a0044..93b778529d10 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/CustomBinaryJdbcType.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/CustomBinaryJdbcType.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.sql.Types; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/DatePrecisionTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/DatePrecisionTests.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/DatePrecisionTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/DatePrecisionTests.java index 365986b3fd35..d437b95a4489 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/DatePrecisionTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/DatePrecisionTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.sql.Time; import java.sql.Timestamp; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/DateWithTemporalDateTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/DateWithTemporalDateTest.java similarity index 91% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/DateWithTemporalDateTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/DateWithTemporalDateTest.java index 0debad7a78e0..a01646437aba 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/DateWithTemporalDateTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/DateWithTemporalDateTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.util.Date; import jakarta.persistence.Column; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/DateWithTemporalTimeTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/DateWithTemporalTimeTest.java similarity index 91% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/DateWithTemporalTimeTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/DateWithTemporalTimeTest.java index 5e31659a65ba..5a309d6513b6 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/DateWithTemporalTimeTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/DateWithTemporalTimeTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.util.Date; import jakarta.persistence.Column; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/DateWithTemporalTimestampTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/DateWithTemporalTimestampTest.java similarity index 90% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/DateWithTemporalTimestampTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/DateWithTemporalTimestampTest.java index 13699e311e09..00770684e78b 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/DateWithTemporalTimestampTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/DateWithTemporalTimestampTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.util.Date; import jakarta.persistence.Column; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/DoubleMappingTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/DoubleMappingTests.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/DoubleMappingTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/DoubleMappingTests.java index 0b6c4d67c9d5..ea0203cf25fc 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/DoubleMappingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/DoubleMappingTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.sql.Types; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/DurationMappingLegacyTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/DurationMappingLegacyTests.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/DurationMappingLegacyTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/DurationMappingLegacyTests.java index ae109ecb9a65..a6c577ec45e9 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/DurationMappingLegacyTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/DurationMappingLegacyTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.time.Duration; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/DurationMappingTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/DurationMappingTests.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/DurationMappingTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/DurationMappingTests.java index 4f56899522c1..b3c002ed9f12 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/DurationMappingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/DurationMappingTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.time.Duration; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/EnumerationConverterTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/EnumerationConverterTest.java similarity index 93% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/EnumerationConverterTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/EnumerationConverterTest.java index a273e62bf5a2..da70fa862e05 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/EnumerationConverterTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/EnumerationConverterTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import jakarta.persistence.AttributeConverter; import jakarta.persistence.Convert; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/EnumerationCustomTypeTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/EnumerationCustomTypeTest.java similarity index 88% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/EnumerationCustomTypeTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/EnumerationCustomTypeTest.java index a29422693a72..fb1b2517f42e 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/EnumerationCustomTypeTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/EnumerationCustomTypeTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import org.hibernate.annotations.Type; import org.hibernate.orm.test.jpa.BaseEntityManagerFunctionalTestCase; @@ -49,7 +49,7 @@ public static class Person { private String name; - @Type(org.hibernate.userguide.mapping.basic.GenderType.class) + @Type(GenderType.class) @Column(length = 6) public Gender gender; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/ExplicitBasicTypeTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ExplicitBasicTypeTest.java similarity index 96% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/ExplicitBasicTypeTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ExplicitBasicTypeTest.java index 01af2a2f6e7c..ce4b9246e49b 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/ExplicitBasicTypeTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ExplicitBasicTypeTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import jakarta.persistence.Basic; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/ExplicitColumnNamingTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ExplicitColumnNamingTest.java similarity index 96% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/ExplicitColumnNamingTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ExplicitColumnNamingTest.java index 4a2dc1b84a54..ae009c88b504 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/ExplicitColumnNamingTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ExplicitColumnNamingTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/ExplicitTypeTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ExplicitTypeTest.java similarity index 96% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/ExplicitTypeTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ExplicitTypeTest.java index 7edf9b98a537..5d943222227d 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/ExplicitTypeTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ExplicitTypeTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import jakarta.persistence.Entity; import jakarta.persistence.Id; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/FloatMappingTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/FloatMappingTests.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/FloatMappingTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/FloatMappingTests.java index 85408b87fc41..cb623420debd 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/FloatMappingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/FloatMappingTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.sql.Types; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/FormulaTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/FormulaTest.java similarity index 93% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/FormulaTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/FormulaTest.java index 7ca03f412fda..144b34420805 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/FormulaTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/FormulaTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import jakarta.persistence.Entity; import jakarta.persistence.Id; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/Gender.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/Gender.java similarity index 69% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/Gender.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/Gender.java index 2346dcafc8e3..3406dd19b929 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/Gender.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/Gender.java @@ -1,4 +1,10 @@ -package org.hibernate.userguide.mapping.basic; +/* + * Hibernate, Relational Persistence for Idiomatic Java + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html + */ +package org.hibernate.orm.test.mapping.basic; /** * @author Vlad Mihalcea diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/GenderJavaType.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/GenderJavaType.java similarity index 80% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/GenderJavaType.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/GenderJavaType.java index dff0ab9cafee..ae7f911013b2 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/GenderJavaType.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/GenderJavaType.java @@ -1,4 +1,10 @@ -package org.hibernate.userguide.mapping.basic; +/* + * Hibernate, Relational Persistence for Idiomatic Java + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html + */ +package org.hibernate.orm.test.mapping.basic; import org.hibernate.type.descriptor.WrapperOptions; import org.hibernate.type.descriptor.java.AbstractClassJavaType; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/GenderType.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/GenderType.java similarity index 53% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/GenderType.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/GenderType.java index 81f59a4ee363..dfe7413ea049 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/GenderType.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/GenderType.java @@ -1,4 +1,10 @@ -package org.hibernate.userguide.mapping.basic; +/* + * Hibernate, Relational Persistence for Idiomatic Java + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html + */ +package org.hibernate.orm.test.mapping.basic; import java.sql.Types; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/ImplicitBasicTypeTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ImplicitBasicTypeTest.java similarity index 86% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/ImplicitBasicTypeTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ImplicitBasicTypeTest.java index cb6ba6dbe27a..2bccfc9b85ce 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/ImplicitBasicTypeTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ImplicitBasicTypeTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import jakarta.persistence.Entity; import jakarta.persistence.Id; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/InetAddressMappingTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/InetAddressMappingTests.java similarity index 97% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/InetAddressMappingTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/InetAddressMappingTests.java index 5fd8a6ec28c4..9cc558849b10 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/InetAddressMappingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/InetAddressMappingTests.java @@ -4,10 +4,9 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.net.InetAddress; -import java.net.UnknownHostException; import org.hibernate.metamodel.mapping.JdbcMapping; import org.hibernate.metamodel.mapping.internal.BasicAttributeMapping; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/InstantLiteralTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/InstantLiteralTest.java similarity index 94% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/InstantLiteralTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/InstantLiteralTest.java index 44704c63195c..03fee7c334df 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/InstantLiteralTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/InstantLiteralTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.time.Instant; import java.time.format.DateTimeFormatter; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/InstantMappingTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/InstantMappingTests.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/InstantMappingTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/InstantMappingTests.java index 3fd247cbd059..31af5dd5fbee 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/InstantMappingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/InstantMappingTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.time.Instant; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/IntegerMappingTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/IntegerMappingTests.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/IntegerMappingTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/IntegerMappingTests.java index ecd67a44aebb..2c91b3175dd7 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/IntegerMappingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/IntegerMappingTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.sql.Types; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/JpaQuotingTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/JpaQuotingTest.java similarity index 91% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/JpaQuotingTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/JpaQuotingTest.java index a0c01f17584e..7b5e2583aa13 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/JpaQuotingTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/JpaQuotingTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/JsonMappingTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/JsonMappingTests.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/JsonMappingTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/JsonMappingTests.java index af497f3d52dc..58ead2ce2e73 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/JsonMappingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/JsonMappingTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.nio.charset.StandardCharsets; import java.sql.Blob; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/LocalDateMappingTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/LocalDateMappingTests.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/LocalDateMappingTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/LocalDateMappingTests.java index d050e135d93c..0e445f43459b 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/LocalDateMappingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/LocalDateMappingTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.sql.Types; import java.time.LocalDate; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/LocalDateTimeMappingTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/LocalDateTimeMappingTests.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/LocalDateTimeMappingTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/LocalDateTimeMappingTests.java index 79b448953b40..9dced8ad6ba9 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/LocalDateTimeMappingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/LocalDateTimeMappingTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.sql.Types; import java.time.LocalDateTime; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/LocalDateTimeWithTemporalTimeTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/LocalDateTimeWithTemporalTimeTest.java similarity index 91% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/LocalDateTimeWithTemporalTimeTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/LocalDateTimeWithTemporalTimeTest.java index 3919a0b3e8b7..47d54023ca5d 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/LocalDateTimeWithTemporalTimeTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/LocalDateTimeWithTemporalTimeTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.time.LocalDateTime; import jakarta.persistence.Column; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/LocalTimeMappingTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/LocalTimeMappingTests.java similarity index 96% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/LocalTimeMappingTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/LocalTimeMappingTests.java index c2ede583cfd5..bec469a298f2 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/LocalTimeMappingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/LocalTimeMappingTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.sql.Types; import java.time.LocalTime; @@ -13,7 +13,6 @@ import jakarta.persistence.Id; import jakarta.persistence.Table; -import org.hibernate.metamodel.MappingMetamodel; import org.hibernate.metamodel.mapping.JdbcMapping; import org.hibernate.metamodel.mapping.internal.BasicAttributeMapping; import org.hibernate.metamodel.spi.MappingMetamodelImplementor; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/LocaleMappingTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/LocaleMappingTests.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/LocaleMappingTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/LocaleMappingTests.java index ff1a4e3d5975..75f70e30fdd0 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/LocaleMappingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/LocaleMappingTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.sql.Types; import java.util.Locale; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/LongMappingTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/LongMappingTests.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/LongMappingTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/LongMappingTests.java index 75b6759230b4..5df620dac471 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/LongMappingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/LongMappingTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.sql.Types; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/MonetaryAmount.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/MonetaryAmount.java similarity index 83% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/MonetaryAmount.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/MonetaryAmount.java index 78328fbc1156..2856a511ffd2 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/MonetaryAmount.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/MonetaryAmount.java @@ -1,12 +1,12 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ //$Id$ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.io.Serializable; import java.math.BigDecimal; import java.util.Currency; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/MonetaryAmountUserType.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/MonetaryAmountUserType.java similarity index 94% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/MonetaryAmountUserType.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/MonetaryAmountUserType.java index d7659517a5b9..1b328859d262 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/MonetaryAmountUserType.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/MonetaryAmountUserType.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.io.Serializable; import java.math.BigDecimal; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/NClobCharArrayTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/NClobCharArrayTest.java similarity index 93% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/NClobCharArrayTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/NClobCharArrayTest.java index 53524b155d62..369154ef983c 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/NClobCharArrayTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/NClobCharArrayTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import jakarta.persistence.Entity; import jakarta.persistence.Id; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/NClobStringTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/NClobStringTest.java similarity index 93% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/NClobStringTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/NClobStringTest.java index 952cc16d7593..d9e65171fa0b 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/NClobStringTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/NClobStringTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import jakarta.persistence.Entity; import jakarta.persistence.Id; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/NClobTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/NClobTest.java similarity index 96% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/NClobTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/NClobTest.java index 8f3638119141..0c15a2a98448 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/NClobTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/NClobTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.io.BufferedReader; import java.io.ByteArrayOutputStream; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/NationalizedTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/NationalizedTest.java similarity index 93% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/NationalizedTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/NationalizedTest.java index 82570784afbf..fc12c43657a2 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/NationalizedTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/NationalizedTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import jakarta.persistence.Entity; import jakarta.persistence.Id; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/OffsetDateTimeMappingTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/OffsetDateTimeMappingTests.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/OffsetDateTimeMappingTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/OffsetDateTimeMappingTests.java index efb22242daff..d40f898c319d 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/OffsetDateTimeMappingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/OffsetDateTimeMappingTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.sql.Types; import java.time.OffsetDateTime; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/OffsetTimeMappingTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/OffsetTimeMappingTests.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/OffsetTimeMappingTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/OffsetTimeMappingTests.java index 9477ff861573..6774b3cd3cfc 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/OffsetTimeMappingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/OffsetTimeMappingTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.sql.Types; import java.time.OffsetTime; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/ParentTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ParentTest.java similarity index 94% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/ParentTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ParentTest.java index 07b6441e92aa..fd9c0aa219fd 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/ParentTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ParentTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import jakarta.persistence.Embeddable; import jakarta.persistence.Embedded; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/PhoneTypeEnumeratedOrdinalTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/PhoneTypeEnumeratedOrdinalTest.java similarity index 90% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/PhoneTypeEnumeratedOrdinalTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/PhoneTypeEnumeratedOrdinalTest.java index 4cbb7f14b6b5..c1c0fe227ea9 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/PhoneTypeEnumeratedOrdinalTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/PhoneTypeEnumeratedOrdinalTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import jakarta.persistence.Column; import jakarta.persistence.Entity; @@ -13,7 +13,7 @@ import jakarta.persistence.Id; import org.hibernate.orm.test.jpa.BaseEntityManagerFunctionalTestCase; -import org.hibernate.userguide.model.PhoneType; +import org.hibernate.testing.orm.domain.userguide.PhoneType; import org.junit.Test; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/PhoneTypeEnumeratedStringTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/PhoneTypeEnumeratedStringTest.java similarity index 89% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/PhoneTypeEnumeratedStringTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/PhoneTypeEnumeratedStringTest.java index 3e701d7918ab..700317928b1f 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/PhoneTypeEnumeratedStringTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/PhoneTypeEnumeratedStringTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import jakarta.persistence.Column; import jakarta.persistence.Entity; @@ -13,7 +13,7 @@ import jakarta.persistence.Id; import org.hibernate.orm.test.jpa.BaseEntityManagerFunctionalTestCase; -import org.hibernate.userguide.model.PhoneType; +import org.hibernate.testing.orm.domain.userguide.PhoneType; import org.junit.Test; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/QuotingTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/QuotingTest.java similarity index 91% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/QuotingTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/QuotingTest.java index 6156e025b834..e49083a19333 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/QuotingTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/QuotingTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/ShortMappingTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ShortMappingTests.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/ShortMappingTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ShortMappingTests.java index c9edc29055fd..3cb2725c7bea 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/ShortMappingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ShortMappingTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.sql.Types; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/StringMappingTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/StringMappingTests.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/StringMappingTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/StringMappingTests.java index d7cdfce96445..fa549a651920 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/StringMappingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/StringMappingTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.sql.Types; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/StringNationalizedMappingTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/StringNationalizedMappingTests.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/StringNationalizedMappingTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/StringNationalizedMappingTests.java index c85a4059d641..34c38bdbab23 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/StringNationalizedMappingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/StringNationalizedMappingTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import jakarta.persistence.Entity; import jakarta.persistence.Id; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/SubselectTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/SubselectTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/SubselectTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/SubselectTest.java index e7c5770afcde..acc22c211b28 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/SubselectTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/SubselectTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/TimeZoneMappingTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/TimeZoneMappingTests.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/TimeZoneMappingTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/TimeZoneMappingTests.java index 036791a8476e..ab45c0a965f6 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/TimeZoneMappingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/TimeZoneMappingTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.sql.Types; import java.util.TimeZone; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/TimeZoneStorageMappingTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/TimeZoneStorageMappingTests.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/TimeZoneStorageMappingTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/TimeZoneStorageMappingTests.java index 5834f6d12b14..f75f897ff138 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/TimeZoneStorageMappingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/TimeZoneStorageMappingTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.time.Duration; import java.time.LocalDateTime; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/TypeCategoryTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/TypeCategoryTest.java similarity index 89% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/TypeCategoryTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/TypeCategoryTest.java index 0df704a543ed..43e45d9752d6 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/TypeCategoryTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/TypeCategoryTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.net.URL; import jakarta.persistence.Embeddable; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/XmlMappingTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/XmlMappingTests.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/XmlMappingTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/XmlMappingTests.java index dee266c2052e..b52caa7bd70e 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/XmlMappingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/XmlMappingTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.util.List; import java.util.Map; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/ZoneOffsetMappingTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ZoneOffsetMappingTests.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/ZoneOffsetMappingTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ZoneOffsetMappingTests.java index 7355a5b39a90..2f30c2fd4d46 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/ZoneOffsetMappingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ZoneOffsetMappingTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.sql.Types; import java.time.ZoneOffset; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/ZonedDateTimeMappingTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ZonedDateTimeMappingTests.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/ZonedDateTimeMappingTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ZonedDateTimeMappingTests.java index b34edc7c882d..026b788d2d5b 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/ZonedDateTimeMappingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ZonedDateTimeMappingTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic; +package org.hibernate.orm.test.mapping.basic; import java.sql.Types; import java.time.ZonedDateTime; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetConverterImmutableTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetConverterImmutableTests.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetConverterImmutableTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetConverterImmutableTests.java index 30d53cfaf834..74a8f9c00b54 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetConverterImmutableTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetConverterImmutableTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic.bitset; +package org.hibernate.orm.test.mapping.basic.bitset; import java.sql.Types; import java.util.BitSet; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetConverterMutabilityTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetConverterMutabilityTests.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetConverterMutabilityTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetConverterMutabilityTests.java index 537b34ce6e62..2c406833cb99 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetConverterMutabilityTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetConverterMutabilityTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic.bitset; +package org.hibernate.orm.test.mapping.basic.bitset; import java.sql.Types; import java.util.BitSet; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetConverterTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetConverterTests.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetConverterTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetConverterTests.java index 410cde20c6ee..470cc26471dc 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetConverterTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetConverterTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic.bitset; +package org.hibernate.orm.test.mapping.basic.bitset; import java.sql.Types; import java.util.BitSet; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetHelper.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetHelper.java similarity index 96% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetHelper.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetHelper.java index 1cfc375570a2..c23f1dfadbe0 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetHelper.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetHelper.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic.bitset; +package org.hibernate.orm.test.mapping.basic.bitset; import java.util.BitSet; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetImplicitTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetImplicitTests.java similarity index 97% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetImplicitTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetImplicitTests.java index b5bfbc538c16..61eb89a830dc 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetImplicitTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetImplicitTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic.bitset; +package org.hibernate.orm.test.mapping.basic.bitset; import java.sql.Types; import java.util.BitSet; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetJavaType.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetJavaType.java similarity index 97% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetJavaType.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetJavaType.java index f138b73f16f9..52be45d7dd6e 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetJavaType.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetJavaType.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic.bitset; +package org.hibernate.orm.test.mapping.basic.bitset; import java.sql.Types; import java.util.BitSet; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetJavaTypeContributionTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetJavaTypeContributionTests.java similarity index 97% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetJavaTypeContributionTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetJavaTypeContributionTests.java index d87b2a7d9525..e5c61956ba74 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetJavaTypeContributionTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetJavaTypeContributionTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic.bitset; +package org.hibernate.orm.test.mapping.basic.bitset; import java.util.BitSet; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetJavaTypeContributor.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetJavaTypeContributor.java similarity index 92% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetJavaTypeContributor.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetJavaTypeContributor.java index 0b4fa4f81a63..bb0c08acc04f 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetJavaTypeContributor.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetJavaTypeContributor.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic.bitset; +package org.hibernate.orm.test.mapping.basic.bitset; import org.hibernate.boot.model.TypeContributions; import org.hibernate.boot.model.TypeContributor; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetJavaTypeRegistrationTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetJavaTypeRegistrationTests.java similarity index 97% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetJavaTypeRegistrationTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetJavaTypeRegistrationTests.java index cbaa07227ae3..8210698d2257 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetJavaTypeRegistrationTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetJavaTypeRegistrationTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic.bitset; +package org.hibernate.orm.test.mapping.basic.bitset; import java.util.BitSet; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetJavaTypeTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetJavaTypeTests.java similarity index 97% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetJavaTypeTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetJavaTypeTests.java index c4d823a9ade3..72965e35c63e 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetJavaTypeTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetJavaTypeTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic.bitset; +package org.hibernate.orm.test.mapping.basic.bitset; import java.util.BitSet; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetJdbcTypeCodeTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetJdbcTypeCodeTests.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetJdbcTypeCodeTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetJdbcTypeCodeTests.java index bf42a8265bf4..36695c3c558d 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetJdbcTypeCodeTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetJdbcTypeCodeTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic.bitset; +package org.hibernate.orm.test.mapping.basic.bitset; import java.sql.Types; import java.util.BitSet; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetJdbcTypeRegistrationTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetJdbcTypeRegistrationTests.java similarity index 96% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetJdbcTypeRegistrationTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetJdbcTypeRegistrationTests.java index 04204912e33d..265731ebbd74 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetJdbcTypeRegistrationTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetJdbcTypeRegistrationTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic.bitset; +package org.hibernate.orm.test.mapping.basic.bitset; import java.sql.Types; import java.util.BitSet; @@ -15,8 +15,8 @@ import org.hibernate.annotations.JdbcTypeRegistration; import org.hibernate.metamodel.mapping.internal.BasicAttributeMapping; import org.hibernate.metamodel.spi.MappingMetamodelImplementor; +import org.hibernate.orm.test.mapping.basic.CustomBinaryJdbcType; import org.hibernate.persister.entity.EntityPersister; -import org.hibernate.userguide.mapping.basic.CustomBinaryJdbcType; import org.hibernate.testing.orm.junit.DomainModel; import org.hibernate.testing.orm.junit.SessionFactory; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetJdbcTypeTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetJdbcTypeTests.java similarity index 96% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetJdbcTypeTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetJdbcTypeTests.java index 77f1e2e8c1ab..f5ae986e9ad2 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetJdbcTypeTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetJdbcTypeTests.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic.bitset; +package org.hibernate.orm.test.mapping.basic.bitset; import java.sql.Types; import java.util.BitSet; @@ -15,8 +15,8 @@ import org.hibernate.annotations.JdbcType; import org.hibernate.metamodel.mapping.internal.BasicAttributeMapping; import org.hibernate.metamodel.spi.MappingMetamodelImplementor; +import org.hibernate.orm.test.mapping.basic.CustomBinaryJdbcType; import org.hibernate.persister.entity.EntityPersister; -import org.hibernate.userguide.mapping.basic.CustomBinaryJdbcType; import org.hibernate.testing.orm.junit.DomainModel; import org.hibernate.testing.orm.junit.SessionFactory; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetMutabilityPlan.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetMutabilityPlan.java similarity index 95% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetMutabilityPlan.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetMutabilityPlan.java index 8b5961aa3975..df7da658db80 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetMutabilityPlan.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetMutabilityPlan.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic.bitset; +package org.hibernate.orm.test.mapping.basic.bitset; import java.io.Serializable; import java.util.BitSet; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetRegisteredUserTypeTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetRegisteredUserTypeTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetRegisteredUserTypeTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetRegisteredUserTypeTest.java index b77490fc7bbd..295139c31e52 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetRegisteredUserTypeTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetRegisteredUserTypeTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic.bitset; +package org.hibernate.orm.test.mapping.basic.bitset; import jakarta.persistence.Column; import jakarta.persistence.ColumnResult; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetType.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetType.java similarity index 68% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetType.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetType.java index babadbc65cf5..de8a977e886c 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetType.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetType.java @@ -1,4 +1,10 @@ -package org.hibernate.userguide.mapping.basic.bitset; +/* + * Hibernate, Relational Persistence for Idiomatic Java + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html + */ +package org.hibernate.orm.test.mapping.basic.bitset; import java.util.BitSet; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetTypeTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetTypeTest.java similarity index 97% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetTypeTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetTypeTest.java index f53626376c3a..2aa6cd7baf6a 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetTypeTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetTypeTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.mapping.basic.bitset; +package org.hibernate.orm.test.mapping.basic.bitset; import java.util.BitSet; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetUserType.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetUserType.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetUserType.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetUserType.java index 0349ef72c179..bdabcbf010b8 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetUserType.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetUserType.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic.bitset; +package org.hibernate.orm.test.mapping.basic.bitset; import java.io.Serializable; import java.sql.PreparedStatement; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetUserTypeTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetUserTypeTest.java similarity index 97% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetUserTypeTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetUserTypeTest.java index aa1cd8e16b88..4d4df10c24c2 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/BitSetUserTypeTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/BitSetUserTypeTest.java @@ -4,12 +4,11 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.basic.bitset; +package org.hibernate.orm.test.mapping.basic.bitset; import java.util.BitSet; import org.hibernate.annotations.Type; -import org.hibernate.cfg.Configuration; import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; import org.junit.Test; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/package-info.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/package-info.java similarity index 88% rename from documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/package-info.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/package-info.java index b29424fd1680..41f40246a3c9 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/bitset/package-info.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/bitset/package-info.java @@ -10,4 +10,4 @@ * * Used as the base for the Case Study section in the documentation */ -package org.hibernate.userguide.mapping.basic.bitset; \ No newline at end of file +package org.hibernate.orm.test.mapping.basic.bitset; \ No newline at end of file diff --git a/documentation/src/test/java/org/hibernate/userguide/collections/ArrayTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/ArrayTest.java similarity index 91% rename from documentation/src/test/java/org/hibernate/userguide/collections/ArrayTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/ArrayTest.java index 5cfeb67501d0..b82cdf448c2e 100644 --- a/documentation/src/test/java/org/hibernate/userguide/collections/ArrayTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/ArrayTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.collections; +package org.hibernate.orm.test.mapping.collections; import jakarta.persistence.Entity; import jakarta.persistence.Id; diff --git a/documentation/src/test/java/org/hibernate/userguide/collections/BasicTypeElementCollectionTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/BasicTypeElementCollectionTest.java similarity index 94% rename from documentation/src/test/java/org/hibernate/userguide/collections/BasicTypeElementCollectionTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/BasicTypeElementCollectionTest.java index a745717cfb84..dd5db75ed66a 100644 --- a/documentation/src/test/java/org/hibernate/userguide/collections/BasicTypeElementCollectionTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/BasicTypeElementCollectionTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.collections; +package org.hibernate.orm.test.mapping.collections; import java.util.ArrayList; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/collections/BasicTypeOrderColumnElementCollectionTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/BasicTypeOrderColumnElementCollectionTest.java similarity index 91% rename from documentation/src/test/java/org/hibernate/userguide/collections/BasicTypeOrderColumnElementCollectionTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/BasicTypeOrderColumnElementCollectionTest.java index 9c25d1e1fc20..f6c33c0aed15 100644 --- a/documentation/src/test/java/org/hibernate/userguide/collections/BasicTypeOrderColumnElementCollectionTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/BasicTypeOrderColumnElementCollectionTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.collections; +package org.hibernate.orm.test.mapping.collections; import java.util.ArrayList; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/collections/BidirectionalBagOrphanRemovalTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/BidirectionalBagOrphanRemovalTest.java similarity index 94% rename from documentation/src/test/java/org/hibernate/userguide/collections/BidirectionalBagOrphanRemovalTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/BidirectionalBagOrphanRemovalTest.java index ac4e2330e37c..64c83ea21bb4 100644 --- a/documentation/src/test/java/org/hibernate/userguide/collections/BidirectionalBagOrphanRemovalTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/BidirectionalBagOrphanRemovalTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.collections; +package org.hibernate.orm.test.mapping.collections; import java.util.ArrayList; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/collections/BidirectionalBagTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/BidirectionalBagTest.java similarity index 95% rename from documentation/src/test/java/org/hibernate/userguide/collections/BidirectionalBagTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/BidirectionalBagTest.java index 2c071b239aa9..30e01b3aec5f 100644 --- a/documentation/src/test/java/org/hibernate/userguide/collections/BidirectionalBagTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/BidirectionalBagTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.collections; +package org.hibernate.orm.test.mapping.collections; import java.util.ArrayList; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/collections/BidirectionalComparatorSortedSetTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/BidirectionalComparatorSortedSetTest.java similarity index 96% rename from documentation/src/test/java/org/hibernate/userguide/collections/BidirectionalComparatorSortedSetTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/BidirectionalComparatorSortedSetTest.java index c73471e8d3ec..f0a794284a74 100644 --- a/documentation/src/test/java/org/hibernate/userguide/collections/BidirectionalComparatorSortedSetTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/BidirectionalComparatorSortedSetTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.collections; +package org.hibernate.orm.test.mapping.collections; import java.util.Comparator; import java.util.Objects; diff --git a/documentation/src/test/java/org/hibernate/userguide/collections/BidirectionalMapTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/BidirectionalMapTest.java similarity index 95% rename from documentation/src/test/java/org/hibernate/userguide/collections/BidirectionalMapTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/BidirectionalMapTest.java index 21e17a8ddcc9..0963cb6084dd 100644 --- a/documentation/src/test/java/org/hibernate/userguide/collections/BidirectionalMapTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/BidirectionalMapTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.collections; +package org.hibernate.orm.test.mapping.collections; import java.sql.Timestamp; import java.time.LocalDateTime; diff --git a/documentation/src/test/java/org/hibernate/userguide/collections/BidirectionalOrderByListTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/BidirectionalOrderByListTest.java similarity index 95% rename from documentation/src/test/java/org/hibernate/userguide/collections/BidirectionalOrderByListTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/BidirectionalOrderByListTest.java index e7458ea09a98..7715c7f5511a 100644 --- a/documentation/src/test/java/org/hibernate/userguide/collections/BidirectionalOrderByListTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/BidirectionalOrderByListTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.collections; +package org.hibernate.orm.test.mapping.collections; import java.util.ArrayList; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/collections/BidirectionalOrderColumnListTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/BidirectionalOrderColumnListTest.java similarity index 95% rename from documentation/src/test/java/org/hibernate/userguide/collections/BidirectionalOrderColumnListTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/BidirectionalOrderColumnListTest.java index 56a9af331a32..2ff934a4c8ac 100644 --- a/documentation/src/test/java/org/hibernate/userguide/collections/BidirectionalOrderColumnListTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/BidirectionalOrderColumnListTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.collections; +package org.hibernate.orm.test.mapping.collections; import java.util.ArrayList; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/collections/BidirectionalSetTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/BidirectionalSetTest.java similarity index 95% rename from documentation/src/test/java/org/hibernate/userguide/collections/BidirectionalSetTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/BidirectionalSetTest.java index 789519975a1a..552bfa4e1308 100644 --- a/documentation/src/test/java/org/hibernate/userguide/collections/BidirectionalSetTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/BidirectionalSetTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.collections; +package org.hibernate.orm.test.mapping.collections; import java.util.HashSet; import java.util.Objects; diff --git a/documentation/src/test/java/org/hibernate/userguide/collections/BidirectionalSortedSetTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/BidirectionalSortedSetTest.java similarity index 95% rename from documentation/src/test/java/org/hibernate/userguide/collections/BidirectionalSortedSetTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/BidirectionalSortedSetTest.java index 0e0e3b35f8a0..7fb488365cdf 100644 --- a/documentation/src/test/java/org/hibernate/userguide/collections/BidirectionalSortedSetTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/BidirectionalSortedSetTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.collections; +package org.hibernate.orm.test.mapping.collections; import java.util.Objects; import java.util.Set; diff --git a/documentation/src/test/java/org/hibernate/userguide/collections/CollectionTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/CollectionTest.java similarity index 97% rename from documentation/src/test/java/org/hibernate/userguide/collections/CollectionTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/CollectionTest.java index 1a146719a78c..1a1694717b30 100644 --- a/documentation/src/test/java/org/hibernate/userguide/collections/CollectionTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/CollectionTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.collections; +package org.hibernate.orm.test.mapping.collections; import java.util.ArrayList; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/collections/ElementCollectionMapTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/ElementCollectionMapTest.java similarity index 95% rename from documentation/src/test/java/org/hibernate/userguide/collections/ElementCollectionMapTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/ElementCollectionMapTest.java index 89618cef51c2..e899d68f844f 100644 --- a/documentation/src/test/java/org/hibernate/userguide/collections/ElementCollectionMapTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/ElementCollectionMapTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.collections; +package org.hibernate.orm.test.mapping.collections; import java.util.Date; import java.util.HashMap; diff --git a/documentation/src/test/java/org/hibernate/userguide/collections/EmbeddableTypeElementCollectionTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/EmbeddableTypeElementCollectionTest.java similarity index 93% rename from documentation/src/test/java/org/hibernate/userguide/collections/EmbeddableTypeElementCollectionTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/EmbeddableTypeElementCollectionTest.java index a9758a16f72b..f49ffcf6b928 100644 --- a/documentation/src/test/java/org/hibernate/userguide/collections/EmbeddableTypeElementCollectionTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/EmbeddableTypeElementCollectionTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.collections; +package org.hibernate.orm.test.mapping.collections; import java.util.ArrayList; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/collections/MapKeyClassTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/MapKeyClassTest.java similarity index 96% rename from documentation/src/test/java/org/hibernate/userguide/collections/MapKeyClassTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/MapKeyClassTest.java index 5df84eec47b3..e2b1e248e947 100644 --- a/documentation/src/test/java/org/hibernate/userguide/collections/MapKeyClassTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/MapKeyClassTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.collections; +package org.hibernate.orm.test.mapping.collections; import java.util.HashMap; import java.util.Map; diff --git a/documentation/src/test/java/org/hibernate/userguide/collections/MapKeyTypeTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/MapKeyTypeTest.java similarity index 96% rename from documentation/src/test/java/org/hibernate/userguide/collections/MapKeyTypeTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/MapKeyTypeTest.java index 64b7442e7b85..013aa0f0d90e 100644 --- a/documentation/src/test/java/org/hibernate/userguide/collections/MapKeyTypeTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/MapKeyTypeTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.collections; +package org.hibernate.orm.test.mapping.collections; import java.sql.Timestamp; import java.sql.Types; diff --git a/documentation/src/test/java/org/hibernate/userguide/collections/OrderColumnListIndexBaseTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/OrderColumnListIndexBaseTest.java similarity index 95% rename from documentation/src/test/java/org/hibernate/userguide/collections/OrderColumnListIndexBaseTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/OrderColumnListIndexBaseTest.java index f98403ba625b..56fc1b0c12d2 100644 --- a/documentation/src/test/java/org/hibernate/userguide/collections/OrderColumnListIndexBaseTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/OrderColumnListIndexBaseTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.collections; +package org.hibernate.orm.test.mapping.collections; import java.util.ArrayList; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/collections/OrderedBySQLTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/OrderedBySQLTest.java similarity index 96% rename from documentation/src/test/java/org/hibernate/userguide/collections/OrderedBySQLTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/OrderedBySQLTest.java index e0735af77490..871709d9572b 100644 --- a/documentation/src/test/java/org/hibernate/userguide/collections/OrderedBySQLTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/OrderedBySQLTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.collections; +package org.hibernate.orm.test.mapping.collections; import java.util.ArrayList; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/collections/QueueTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/QueueTest.java similarity index 94% rename from documentation/src/test/java/org/hibernate/userguide/collections/QueueTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/QueueTest.java index d77ca07271c2..a5f81e7f99b7 100644 --- a/documentation/src/test/java/org/hibernate/userguide/collections/QueueTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/QueueTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.collections; +package org.hibernate.orm.test.mapping.collections; import java.util.Collection; import java.util.LinkedList; @@ -19,7 +19,7 @@ import org.hibernate.annotations.CollectionType; import org.hibernate.annotations.NaturalId; import org.hibernate.orm.test.jpa.BaseEntityManagerFunctionalTestCase; -import org.hibernate.userguide.collections.type.QueueType; +import org.hibernate.orm.test.mapping.collections.type.QueueType; import org.junit.Test; diff --git a/documentation/src/test/java/org/hibernate/userguide/collections/UnidirectionalBagTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/UnidirectionalBagTest.java similarity index 94% rename from documentation/src/test/java/org/hibernate/userguide/collections/UnidirectionalBagTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/UnidirectionalBagTest.java index b6a28662ef5a..70986f872e20 100644 --- a/documentation/src/test/java/org/hibernate/userguide/collections/UnidirectionalBagTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/UnidirectionalBagTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.collections; +package org.hibernate.orm.test.mapping.collections; import java.util.ArrayList; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/collections/UnidirectionalComparatorSortedSetTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/UnidirectionalComparatorSortedSetTest.java similarity index 96% rename from documentation/src/test/java/org/hibernate/userguide/collections/UnidirectionalComparatorSortedSetTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/UnidirectionalComparatorSortedSetTest.java index c03cfa947082..b967849e2563 100644 --- a/documentation/src/test/java/org/hibernate/userguide/collections/UnidirectionalComparatorSortedSetTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/UnidirectionalComparatorSortedSetTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.collections; +package org.hibernate.orm.test.mapping.collections; import java.util.Comparator; import java.util.Objects; diff --git a/documentation/src/test/java/org/hibernate/userguide/collections/UnidirectionalMapTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/UnidirectionalMapTest.java similarity index 95% rename from documentation/src/test/java/org/hibernate/userguide/collections/UnidirectionalMapTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/UnidirectionalMapTest.java index 221a7bfcfd0f..7d8bb250bac4 100644 --- a/documentation/src/test/java/org/hibernate/userguide/collections/UnidirectionalMapTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/UnidirectionalMapTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.collections; +package org.hibernate.orm.test.mapping.collections; import java.sql.Timestamp; import java.time.LocalDateTime; diff --git a/documentation/src/test/java/org/hibernate/userguide/collections/UnidirectionalOrderColumnListTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/UnidirectionalOrderColumnListTest.java similarity index 93% rename from documentation/src/test/java/org/hibernate/userguide/collections/UnidirectionalOrderColumnListTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/UnidirectionalOrderColumnListTest.java index 18617d82af4a..0fae9fca9eea 100644 --- a/documentation/src/test/java/org/hibernate/userguide/collections/UnidirectionalOrderColumnListTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/UnidirectionalOrderColumnListTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.collections; +package org.hibernate.orm.test.mapping.collections; import java.util.ArrayList; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/collections/UnidirectionalOrderedByListTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/UnidirectionalOrderedByListTest.java similarity index 94% rename from documentation/src/test/java/org/hibernate/userguide/collections/UnidirectionalOrderedByListTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/UnidirectionalOrderedByListTest.java index 21d20a3f0962..7b8abc848ec3 100644 --- a/documentation/src/test/java/org/hibernate/userguide/collections/UnidirectionalOrderedByListTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/UnidirectionalOrderedByListTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.collections; +package org.hibernate.orm.test.mapping.collections; import java.util.ArrayList; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/collections/UnidirectionalSetTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/UnidirectionalSetTest.java similarity index 95% rename from documentation/src/test/java/org/hibernate/userguide/collections/UnidirectionalSetTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/UnidirectionalSetTest.java index 903c6c5a17b0..25f209382066 100644 --- a/documentation/src/test/java/org/hibernate/userguide/collections/UnidirectionalSetTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/UnidirectionalSetTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.collections; +package org.hibernate.orm.test.mapping.collections; import java.util.HashSet; import java.util.Objects; diff --git a/documentation/src/test/java/org/hibernate/userguide/collections/UnidirectionalSortedSetTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/UnidirectionalSortedSetTest.java similarity index 95% rename from documentation/src/test/java/org/hibernate/userguide/collections/UnidirectionalSortedSetTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/UnidirectionalSortedSetTest.java index b8f8c034fbe0..801e7d457bc1 100644 --- a/documentation/src/test/java/org/hibernate/userguide/collections/UnidirectionalSortedSetTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/UnidirectionalSortedSetTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.collections; +package org.hibernate.orm.test.mapping.collections; import java.util.Objects; import java.util.Set; diff --git a/documentation/src/test/java/org/hibernate/userguide/collections/type/PersistentQueue.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/type/PersistentQueue.java similarity index 96% rename from documentation/src/test/java/org/hibernate/userguide/collections/type/PersistentQueue.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/type/PersistentQueue.java index dbbfad66f1f2..679daec0d097 100644 --- a/documentation/src/test/java/org/hibernate/userguide/collections/type/PersistentQueue.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/type/PersistentQueue.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.collections.type; +package org.hibernate.orm.test.mapping.collections.type; import java.util.List; import java.util.NoSuchElementException; diff --git a/documentation/src/test/java/org/hibernate/userguide/collections/type/QueueType.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/type/QueueType.java similarity index 97% rename from documentation/src/test/java/org/hibernate/userguide/collections/type/QueueType.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/type/QueueType.java index eede978b7032..d5981daaa403 100644 --- a/documentation/src/test/java/org/hibernate/userguide/collections/type/QueueType.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/type/QueueType.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.collections.type; +package org.hibernate.orm.test.mapping.collections.type; import java.util.Iterator; import java.util.LinkedList; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/converter/MoneyConverterTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converter/MoneyConverterTest.java similarity index 94% rename from documentation/src/test/java/org/hibernate/userguide/mapping/converter/MoneyConverterTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converter/MoneyConverterTest.java index 414e9b9e5963..f7baec253034 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/converter/MoneyConverterTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converter/MoneyConverterTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.converter; +package org.hibernate.orm.test.mapping.converter; import jakarta.persistence.AttributeConverter; import jakarta.persistence.Convert; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/converter/PeriodStringConverter.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converter/PeriodStringConverter.java similarity index 82% rename from documentation/src/test/java/org/hibernate/userguide/mapping/converter/PeriodStringConverter.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converter/PeriodStringConverter.java index d4bdc19eee04..6d9ac100c52b 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/converter/PeriodStringConverter.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converter/PeriodStringConverter.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.converter; +package org.hibernate.orm.test.mapping.converter; import java.time.Period; import jakarta.persistence.AttributeConverter; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/converter/PeriodStringTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converter/PeriodStringTest.java similarity index 94% rename from documentation/src/test/java/org/hibernate/userguide/mapping/converter/PeriodStringTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converter/PeriodStringTest.java index c371708302c4..08e71a3e3cec 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/converter/PeriodStringTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converter/PeriodStringTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.converter; +package org.hibernate.orm.test.mapping.converter; import java.time.Period; import jakarta.persistence.Column; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/converter/hbm/Account.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converter/hbm/Account.java similarity index 94% rename from documentation/src/test/java/org/hibernate/userguide/mapping/converter/hbm/Account.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converter/hbm/Account.java index 7cb546985913..5126166fc329 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/converter/hbm/Account.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converter/hbm/Account.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.mapping.converter.hbm; +package org.hibernate.orm.test.mapping.converter.hbm; //tag::basic-hbm-attribute-converter-mapping-account-example[] public class Account { diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/converter/hbm/Money.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converter/hbm/Money.java similarity index 75% rename from documentation/src/test/java/org/hibernate/userguide/mapping/converter/hbm/Money.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converter/hbm/Money.java index 6a09348264c8..2ba1c0b4d4ab 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/converter/hbm/Money.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converter/hbm/Money.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.converter.hbm; +package org.hibernate.orm.test.mapping.converter.hbm; //tag::basic-hbm-attribute-converter-mapping-money-example[] public class Money { diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/converter/hbm/MoneyConverter.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converter/hbm/MoneyConverter.java similarity index 80% rename from documentation/src/test/java/org/hibernate/userguide/mapping/converter/hbm/MoneyConverter.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converter/hbm/MoneyConverter.java index c3844c697bab..119d3c742802 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/converter/hbm/MoneyConverter.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converter/hbm/MoneyConverter.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.converter.hbm; +package org.hibernate.orm.test.mapping.converter.hbm; import jakarta.persistence.AttributeConverter; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/converter/hbm/MoneyConverterHbmTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converter/hbm/MoneyConverterHbmTest.java similarity index 82% rename from documentation/src/test/java/org/hibernate/userguide/mapping/converter/hbm/MoneyConverterHbmTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converter/hbm/MoneyConverterHbmTest.java index 169070121706..2813b9205cec 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/converter/hbm/MoneyConverterHbmTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converter/hbm/MoneyConverterHbmTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.converter.hbm; +package org.hibernate.orm.test.mapping.converter.hbm; import org.hibernate.orm.test.jpa.BaseEntityManagerFunctionalTestCase; @@ -41,7 +41,7 @@ public void testConverterMutability() { @Override protected String[] getMappings() { return new String[] { - "org/hibernate/userguide/mapping/converter/hbm/MoneyConverterHbmTest.hbm.xml" + "org/hibernate/orm/test/mapping/converter/hbm/MoneyConverterHbmTest.hbm.xml" }; } } diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/dynamic/Book.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/dynamic/Book.java similarity index 72% rename from documentation/src/test/java/org/hibernate/userguide/mapping/dynamic/Book.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/dynamic/Book.java index a26b71ebc079..a750b9cdf910 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/dynamic/Book.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/dynamic/Book.java @@ -1,4 +1,10 @@ -package org.hibernate.userguide.mapping.dynamic; +/* + * Hibernate, Relational Persistence for Idiomatic Java + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html + */ +package org.hibernate.orm.test.mapping.dynamic; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/dynamic/DynamicEntityTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/dynamic/DynamicEntityTest.java similarity index 85% rename from documentation/src/test/java/org/hibernate/userguide/mapping/dynamic/DynamicEntityTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/dynamic/DynamicEntityTest.java index 88142deef510..a2ee359f6664 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/dynamic/DynamicEntityTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/dynamic/DynamicEntityTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.dynamic; +package org.hibernate.orm.test.mapping.dynamic; import java.util.HashMap; import java.util.Map; @@ -24,7 +24,7 @@ public class DynamicEntityTest extends BaseEntityManagerFunctionalTestCase { @Override protected String[] getMappings() { return new String[] { - "org/hibernate/userguide/mapping/dynamic/Book.hbm.xml" + "org/hibernate/orm/test/mapping/dynamic/Book.hbm.xml" }; } diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/embeddable/EmbeddableAggregate.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/EmbeddableAggregate.java similarity index 97% rename from documentation/src/test/java/org/hibernate/userguide/mapping/embeddable/EmbeddableAggregate.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/EmbeddableAggregate.java index 81c51940c537..0f699d671396 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/embeddable/EmbeddableAggregate.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/EmbeddableAggregate.java @@ -1,4 +1,10 @@ -package org.hibernate.userguide.mapping.embeddable; +/* + * Hibernate, Relational Persistence for Idiomatic Java + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html + */ +package org.hibernate.orm.test.mapping.embeddable; import java.net.MalformedURLException; import java.net.URL; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/embeddable/EmbeddableImplicitOverrideTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/EmbeddableImplicitOverrideTest.java similarity index 96% rename from documentation/src/test/java/org/hibernate/userguide/mapping/embeddable/EmbeddableImplicitOverrideTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/EmbeddableImplicitOverrideTest.java index a7fadeb7f5f7..1d62c87ec525 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/embeddable/EmbeddableImplicitOverrideTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/EmbeddableImplicitOverrideTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.embeddable; +package org.hibernate.orm.test.mapping.embeddable; import jakarta.persistence.Embeddable; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/embeddable/EmbeddableOverrideTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/EmbeddableOverrideTest.java similarity index 96% rename from documentation/src/test/java/org/hibernate/userguide/mapping/embeddable/EmbeddableOverrideTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/EmbeddableOverrideTest.java index 6792acac9cbc..d86cbe9adabc 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/embeddable/EmbeddableOverrideTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/EmbeddableOverrideTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.embeddable; +package org.hibernate.orm.test.mapping.embeddable; import jakarta.persistence.AssociationOverride; import jakarta.persistence.AssociationOverrides; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/embeddable/JsonEmbeddableTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/JsonEmbeddableTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/mapping/embeddable/JsonEmbeddableTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/JsonEmbeddableTest.java index ed76d715d94e..3ab0bd2f141b 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/embeddable/JsonEmbeddableTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/JsonEmbeddableTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.embeddable; +package org.hibernate.orm.test.mapping.embeddable; import java.sql.Clob; import java.sql.Time; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/embeddable/NestedEmbeddableTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/NestedEmbeddableTest.java similarity index 95% rename from documentation/src/test/java/org/hibernate/userguide/mapping/embeddable/NestedEmbeddableTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/NestedEmbeddableTest.java index 2ed8d110605b..b52bd66a27e6 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/embeddable/NestedEmbeddableTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/NestedEmbeddableTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.embeddable; +package org.hibernate.orm.test.mapping.embeddable; import jakarta.persistence.Embeddable; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/embeddable/NestedJsonEmbeddableTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/NestedJsonEmbeddableTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/mapping/embeddable/NestedJsonEmbeddableTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/NestedJsonEmbeddableTest.java index 9c99b2e65871..90e9b34ceafb 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/embeddable/NestedJsonEmbeddableTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/NestedJsonEmbeddableTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.embeddable; +package org.hibernate.orm.test.mapping.embeddable; import java.sql.Clob; import java.sql.Time; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/embeddable/NestedStructEmbeddableTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/NestedStructEmbeddableTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/mapping/embeddable/NestedStructEmbeddableTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/NestedStructEmbeddableTest.java index ba6d98589c95..dadade780bb7 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/embeddable/NestedStructEmbeddableTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/NestedStructEmbeddableTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.embeddable; +package org.hibernate.orm.test.mapping.embeddable; import java.sql.Clob; import java.sql.Time; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/embeddable/ParentTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/ParentTest.java similarity index 94% rename from documentation/src/test/java/org/hibernate/userguide/mapping/embeddable/ParentTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/ParentTest.java index 11a5472293fd..66f67132da1d 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/embeddable/ParentTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/ParentTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.embeddable; +package org.hibernate.orm.test.mapping.embeddable; import jakarta.persistence.Embeddable; import jakarta.persistence.Embedded; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/embeddable/SimpleEmbeddableEquivalentTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/SimpleEmbeddableEquivalentTest.java similarity index 93% rename from documentation/src/test/java/org/hibernate/userguide/mapping/embeddable/SimpleEmbeddableEquivalentTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/SimpleEmbeddableEquivalentTest.java index 82247ee2222d..701c928c3035 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/embeddable/SimpleEmbeddableEquivalentTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/SimpleEmbeddableEquivalentTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.embeddable; +package org.hibernate.orm.test.mapping.embeddable; import jakarta.persistence.Column; import jakarta.persistence.Embeddable; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/embeddable/SimpleEmbeddableTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/SimpleEmbeddableTest.java similarity index 94% rename from documentation/src/test/java/org/hibernate/userguide/mapping/embeddable/SimpleEmbeddableTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/SimpleEmbeddableTest.java index a049f7920e9a..89832b7b07c9 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/embeddable/SimpleEmbeddableTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/SimpleEmbeddableTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.embeddable; +package org.hibernate.orm.test.mapping.embeddable; import jakarta.persistence.Column; import jakarta.persistence.Embeddable; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/embeddable/StructEmbeddableTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/StructEmbeddableTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/mapping/embeddable/StructEmbeddableTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/StructEmbeddableTest.java index dab158c1ad34..4ba96ed585b5 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/embeddable/StructEmbeddableTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/StructEmbeddableTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.embeddable; +package org.hibernate.orm.test.mapping.embeddable; import java.sql.Clob; import java.sql.Time; @@ -47,7 +47,6 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import jakarta.persistence.Embeddable; import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.ParameterMode; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/embeddable/TargetTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/TargetTest.java similarity index 94% rename from documentation/src/test/java/org/hibernate/userguide/mapping/embeddable/TargetTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/TargetTest.java index 72ccb7c05671..645eab064fe8 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/embeddable/TargetTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/TargetTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.embeddable; +package org.hibernate.orm.test.mapping.embeddable; import jakarta.persistence.Embeddable; import jakarta.persistence.Embedded; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/generated/CreationTimestampTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/generated/CreationTimestampTest.java similarity index 91% rename from documentation/src/test/java/org/hibernate/userguide/mapping/generated/CreationTimestampTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/generated/CreationTimestampTest.java index fc2756379727..8b0e1fd54c3f 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/generated/CreationTimestampTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/generated/CreationTimestampTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.generated; +package org.hibernate.orm.test.mapping.generated; import java.util.Date; import jakarta.persistence.Column; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/generated/DatabaseValueGenerationTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/generated/DatabaseValueGenerationTest.java similarity index 95% rename from documentation/src/test/java/org/hibernate/userguide/mapping/generated/DatabaseValueGenerationTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/generated/DatabaseValueGenerationTest.java index 02d8806dda1d..fc9a3d7d016f 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/generated/DatabaseValueGenerationTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/generated/DatabaseValueGenerationTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.generated; +package org.hibernate.orm.test.mapping.generated; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/generated/GeneratedTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/generated/GeneratedTest.java similarity index 96% rename from documentation/src/test/java/org/hibernate/userguide/mapping/generated/GeneratedTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/generated/GeneratedTest.java index 02ae303a771c..3a79d87a6fd1 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/generated/GeneratedTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/generated/GeneratedTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.generated; +package org.hibernate.orm.test.mapping.generated; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/generated/GeneratorTypeTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/generated/GeneratorTypeTest.java similarity index 95% rename from documentation/src/test/java/org/hibernate/userguide/mapping/generated/GeneratorTypeTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/generated/GeneratorTypeTest.java index 5579fd54d7eb..b88eeb17c7a8 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/generated/GeneratorTypeTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/generated/GeneratorTypeTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.generated; +package org.hibernate.orm.test.mapping.generated; import jakarta.persistence.Entity; import jakarta.persistence.Id; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/generated/InMemoryValueGenerationTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/generated/InMemoryValueGenerationTest.java similarity index 94% rename from documentation/src/test/java/org/hibernate/userguide/mapping/generated/InMemoryValueGenerationTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/generated/InMemoryValueGenerationTest.java index ab6b69757547..d2b1f63c2ef7 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/generated/InMemoryValueGenerationTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/generated/InMemoryValueGenerationTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.generated; +package org.hibernate.orm.test.mapping.generated; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/generated/UpdateTimestampTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/generated/UpdateTimestampTest.java similarity index 93% rename from documentation/src/test/java/org/hibernate/userguide/mapping/generated/UpdateTimestampTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/generated/UpdateTimestampTest.java index 73972488292c..a4c30a90fba0 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/generated/UpdateTimestampTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/generated/UpdateTimestampTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.generated; +package org.hibernate.orm.test.mapping.generated; import java.util.Date; import jakarta.persistence.Column; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/AssignedIdentifierTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/AssignedIdentifierTest.java similarity index 97% rename from documentation/src/test/java/org/hibernate/userguide/mapping/identifier/AssignedIdentifierTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/AssignedIdentifierTest.java index bffb2d2369dc..ea84c740a68e 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/AssignedIdentifierTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/AssignedIdentifierTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.mapping.identifier; +package org.hibernate.orm.test.mapping.identifier; import jakarta.persistence.Entity; import jakarta.persistence.Id; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/Book.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/Book.java similarity index 95% rename from documentation/src/test/java/org/hibernate/userguide/mapping/identifier/Book.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/Book.java index 85d5eba3dfd6..d4573bed9f4b 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/Book.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/Book.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.mapping.identifier; +package org.hibernate.orm.test.mapping.identifier; import jakarta.persistence.Entity; import jakarta.persistence.Id; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/CompositeNaturalIdTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/CompositeNaturalIdTest.java similarity index 96% rename from documentation/src/test/java/org/hibernate/userguide/mapping/identifier/CompositeNaturalIdTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/CompositeNaturalIdTest.java index d73d4a72f9c8..7f149965d202 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/CompositeNaturalIdTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/CompositeNaturalIdTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.identifier; +package org.hibernate.orm.test.mapping.identifier; import java.io.Serializable; import java.util.Objects; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/EmbeddedIdManyToOneTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/EmbeddedIdManyToOneTest.java similarity index 95% rename from documentation/src/test/java/org/hibernate/userguide/mapping/identifier/EmbeddedIdManyToOneTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/EmbeddedIdManyToOneTest.java index c23ff3498da6..c5b4242dd185 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/EmbeddedIdManyToOneTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/EmbeddedIdManyToOneTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.identifier; +package org.hibernate.orm.test.mapping.identifier; import java.io.Serializable; import java.util.Objects; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/EmbeddedIdTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/EmbeddedIdTest.java similarity index 94% rename from documentation/src/test/java/org/hibernate/userguide/mapping/identifier/EmbeddedIdTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/EmbeddedIdTest.java index a6ef25dfa537..06f06d77a3e2 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/EmbeddedIdTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/EmbeddedIdTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.identifier; +package org.hibernate.orm.test.mapping.identifier; import java.io.Serializable; import java.util.Objects; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/EntityTableCatalogTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/EntityTableCatalogTest.java similarity index 91% rename from documentation/src/test/java/org/hibernate/userguide/mapping/identifier/EntityTableCatalogTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/EntityTableCatalogTest.java index f330695be98a..02774b0d946c 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/EntityTableCatalogTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/EntityTableCatalogTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.identifier; +package org.hibernate.orm.test.mapping.identifier; import jakarta.persistence.Entity; import jakarta.persistence.Id; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/EntityTableSchemaTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/EntityTableSchemaTest.java similarity index 90% rename from documentation/src/test/java/org/hibernate/userguide/mapping/identifier/EntityTableSchemaTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/EntityTableSchemaTest.java index ece6ddfb5bc6..1aaaf5d4cb68 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/EntityTableSchemaTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/EntityTableSchemaTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.identifier; +package org.hibernate.orm.test.mapping.identifier; import jakarta.persistence.Entity; import jakarta.persistence.Id; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/GeneratedIdentifierTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/GeneratedIdentifierTest.java similarity index 91% rename from documentation/src/test/java/org/hibernate/userguide/mapping/identifier/GeneratedIdentifierTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/GeneratedIdentifierTest.java index 5664af332f46..9cad5def2073 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/GeneratedIdentifierTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/GeneratedIdentifierTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.identifier; +package org.hibernate.orm.test.mapping.identifier; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/IdClassGeneratedValueTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/IdClassGeneratedValueTest.java similarity index 95% rename from documentation/src/test/java/org/hibernate/userguide/mapping/identifier/IdClassGeneratedValueTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/IdClassGeneratedValueTest.java index 0f21f6d519b4..41e4d4cdf0e3 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/IdClassGeneratedValueTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/IdClassGeneratedValueTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.identifier; +package org.hibernate.orm.test.mapping.identifier; import java.io.Serializable; import java.util.Objects; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/IdClassManyToOneTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/IdClassManyToOneTest.java similarity index 96% rename from documentation/src/test/java/org/hibernate/userguide/mapping/identifier/IdClassManyToOneTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/IdClassManyToOneTest.java index f42e7f2e7b41..0c670292011f 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/IdClassManyToOneTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/IdClassManyToOneTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.identifier; +package org.hibernate.orm.test.mapping.identifier; import java.io.Serializable; import java.util.Objects; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/IdClassTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/IdClassTest.java similarity index 95% rename from documentation/src/test/java/org/hibernate/userguide/mapping/identifier/IdClassTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/IdClassTest.java index 147897ee70c8..50e9203f8fc3 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/IdClassTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/IdClassTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.identifier; +package org.hibernate.orm.test.mapping.identifier; import java.io.Serializable; import java.util.Objects; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/IdManyToOneTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/IdManyToOneTest.java similarity index 96% rename from documentation/src/test/java/org/hibernate/userguide/mapping/identifier/IdManyToOneTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/IdManyToOneTest.java index cc27d0f06282..b1f8523a99f0 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/IdManyToOneTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/IdManyToOneTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.identifier; +package org.hibernate.orm.test.mapping.identifier; import java.io.Serializable; import java.util.Objects; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/MultipleNaturalIdTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/MultipleNaturalIdTest.java similarity index 96% rename from documentation/src/test/java/org/hibernate/userguide/mapping/identifier/MultipleNaturalIdTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/MultipleNaturalIdTest.java index f79d4f8d26ed..03d14712945c 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/MultipleNaturalIdTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/MultipleNaturalIdTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.identifier; +package org.hibernate.orm.test.mapping.identifier; import java.io.Serializable; import java.util.Objects; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/MutableNaturalIdTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/MutableNaturalIdTest.java similarity index 94% rename from documentation/src/test/java/org/hibernate/userguide/mapping/identifier/MutableNaturalIdTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/MutableNaturalIdTest.java index 790f6be04a7a..d280fb86f66f 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/MutableNaturalIdTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/MutableNaturalIdTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.identifier; +package org.hibernate.orm.test.mapping.identifier; import jakarta.persistence.Entity; import jakarta.persistence.Id; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/NaiveEqualsHashCodeEntityTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/NaiveEqualsHashCodeEntityTest.java similarity index 96% rename from documentation/src/test/java/org/hibernate/userguide/mapping/identifier/NaiveEqualsHashCodeEntityTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/NaiveEqualsHashCodeEntityTest.java index 5adc7deb885b..f31d2f25ebca 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/NaiveEqualsHashCodeEntityTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/NaiveEqualsHashCodeEntityTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.identifier; +package org.hibernate.orm.test.mapping.identifier; import java.util.HashSet; import java.util.Objects; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/NaturalIdEqualsHashCodeEntityTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/NaturalIdEqualsHashCodeEntityTest.java similarity index 95% rename from documentation/src/test/java/org/hibernate/userguide/mapping/identifier/NaturalIdEqualsHashCodeEntityTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/NaturalIdEqualsHashCodeEntityTest.java index 41ba3b3146a7..7b5f794cc67e 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/NaturalIdEqualsHashCodeEntityTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/NaturalIdEqualsHashCodeEntityTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.identifier; +package org.hibernate.orm.test.mapping.identifier; import java.util.HashSet; import java.util.Objects; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/PooledOptimizerTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/PooledOptimizerTest.java similarity index 94% rename from documentation/src/test/java/org/hibernate/userguide/mapping/identifier/PooledOptimizerTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/PooledOptimizerTest.java index 834c6483693e..2c80a8dbb3b0 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/PooledOptimizerTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/PooledOptimizerTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.identifier; +package org.hibernate.orm.test.mapping.identifier; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/RowIdTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/RowIdTest.java similarity index 92% rename from documentation/src/test/java/org/hibernate/userguide/mapping/identifier/RowIdTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/RowIdTest.java index adf1b3747db5..14ff20346b5a 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/RowIdTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/RowIdTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.identifier; +package org.hibernate.orm.test.mapping.identifier; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/SequenceGeneratorAnnotationNameTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/SequenceGeneratorAnnotationNameTest.java similarity index 97% rename from documentation/src/test/java/org/hibernate/userguide/mapping/identifier/SequenceGeneratorAnnotationNameTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/SequenceGeneratorAnnotationNameTest.java index 75bac3c266d5..ae083203aeb6 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/SequenceGeneratorAnnotationNameTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/SequenceGeneratorAnnotationNameTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.identifier; +package org.hibernate.orm.test.mapping.identifier; import org.hibernate.orm.test.jpa.BaseEntityManagerFunctionalTestCase; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/SequenceGeneratorConfiguredTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/SequenceGeneratorConfiguredTest.java similarity index 92% rename from documentation/src/test/java/org/hibernate/userguide/mapping/identifier/SequenceGeneratorConfiguredTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/SequenceGeneratorConfiguredTest.java index a2655a3e153d..c46d37215545 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/SequenceGeneratorConfiguredTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/SequenceGeneratorConfiguredTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.identifier; +package org.hibernate.orm.test.mapping.identifier; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/SequenceGeneratorNamedTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/SequenceGeneratorNamedTest.java similarity index 93% rename from documentation/src/test/java/org/hibernate/userguide/mapping/identifier/SequenceGeneratorNamedTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/SequenceGeneratorNamedTest.java index e5cdb965e9c1..22f53981b4b8 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/SequenceGeneratorNamedTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/SequenceGeneratorNamedTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.identifier; +package org.hibernate.orm.test.mapping.identifier; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/SequenceGeneratorUnnamedTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/SequenceGeneratorUnnamedTest.java similarity index 92% rename from documentation/src/test/java/org/hibernate/userguide/mapping/identifier/SequenceGeneratorUnnamedTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/SequenceGeneratorUnnamedTest.java index 26740a037423..4c3eea08dfa4 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/SequenceGeneratorUnnamedTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/SequenceGeneratorUnnamedTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.identifier; +package org.hibernate.orm.test.mapping.identifier; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/SimpleEntityTableTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/SimpleEntityTableTest.java similarity index 91% rename from documentation/src/test/java/org/hibernate/userguide/mapping/identifier/SimpleEntityTableTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/SimpleEntityTableTest.java index e80bf26151d2..c811a79db34c 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/SimpleEntityTableTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/SimpleEntityTableTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.identifier; +package org.hibernate.orm.test.mapping.identifier; import jakarta.persistence.Entity; import jakarta.persistence.Id; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/SimpleEntityTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/SimpleEntityTest.java similarity index 97% rename from documentation/src/test/java/org/hibernate/userguide/mapping/identifier/SimpleEntityTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/SimpleEntityTest.java index 6a88a089bd74..8f42664c3678 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/SimpleEntityTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/SimpleEntityTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.identifier; +package org.hibernate.orm.test.mapping.identifier; import java.util.HashSet; import java.util.Set; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/SimpleNaturalIdTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/SimpleNaturalIdTest.java similarity index 94% rename from documentation/src/test/java/org/hibernate/userguide/mapping/identifier/SimpleNaturalIdTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/SimpleNaturalIdTest.java index 3076fb5ac935..a513b1e45db7 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/SimpleNaturalIdTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/SimpleNaturalIdTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.identifier; +package org.hibernate.orm.test.mapping.identifier; import jakarta.persistence.Entity; import jakarta.persistence.Id; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/SimplePartitionKeyTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/SimplePartitionKeyTest.java similarity index 97% rename from documentation/src/test/java/org/hibernate/userguide/mapping/identifier/SimplePartitionKeyTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/SimplePartitionKeyTest.java index 6fc625853766..293531d1832c 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/SimplePartitionKeyTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/SimplePartitionKeyTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.mapping.identifier; +package org.hibernate.orm.test.mapping.identifier; import org.hibernate.annotations.PartitionKey; import org.hibernate.orm.test.jpa.BaseEntityManagerFunctionalTestCase; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/TableGeneratorConfiguredTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/TableGeneratorConfiguredTest.java similarity index 92% rename from documentation/src/test/java/org/hibernate/userguide/mapping/identifier/TableGeneratorConfiguredTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/TableGeneratorConfiguredTest.java index 29c8709eac2e..74977f632ba0 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/TableGeneratorConfiguredTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/TableGeneratorConfiguredTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.identifier; +package org.hibernate.orm.test.mapping.identifier; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/TableGeneratorUnnamedTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/TableGeneratorUnnamedTest.java similarity index 91% rename from documentation/src/test/java/org/hibernate/userguide/mapping/identifier/TableGeneratorUnnamedTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/TableGeneratorUnnamedTest.java index 1106735c2a56..1483ebdb3185 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/TableGeneratorUnnamedTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/TableGeneratorUnnamedTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.identifier; +package org.hibernate.orm.test.mapping.identifier; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/UuidCustomGeneratedValueTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/UuidCustomGeneratedValueTest.java similarity index 93% rename from documentation/src/test/java/org/hibernate/userguide/mapping/identifier/UuidCustomGeneratedValueTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/UuidCustomGeneratedValueTest.java index fa795ac996cc..7e624987f8f3 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/UuidCustomGeneratedValueTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/UuidCustomGeneratedValueTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.identifier; +package org.hibernate.orm.test.mapping.identifier; import java.util.UUID; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/UuidGeneratedValueTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/UuidGeneratedValueTest.java similarity index 92% rename from documentation/src/test/java/org/hibernate/userguide/mapping/identifier/UuidGeneratedValueTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/UuidGeneratedValueTest.java index ce948c6aa60b..8f17a5755742 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/UuidGeneratedValueTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/UuidGeneratedValueTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.identifier; +package org.hibernate.orm.test.mapping.identifier; import java.util.UUID; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/composite/EmbeddedIdDatabaseGeneratedValueTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/composite/EmbeddedIdDatabaseGeneratedValueTest.java similarity index 91% rename from documentation/src/test/java/org/hibernate/userguide/mapping/identifier/composite/EmbeddedIdDatabaseGeneratedValueTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/composite/EmbeddedIdDatabaseGeneratedValueTest.java index 4da71d8b5750..01c4459b83f4 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/composite/EmbeddedIdDatabaseGeneratedValueTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/composite/EmbeddedIdDatabaseGeneratedValueTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.identifier.composite; +package org.hibernate.orm.test.mapping.identifier.composite; import java.sql.Timestamp; import java.time.OffsetDateTime; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/composite/EmbeddedIdInMemoryGeneratedValueTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/composite/EmbeddedIdInMemoryGeneratedValueTest.java similarity index 89% rename from documentation/src/test/java/org/hibernate/userguide/mapping/identifier/composite/EmbeddedIdInMemoryGeneratedValueTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/composite/EmbeddedIdInMemoryGeneratedValueTest.java index 4bd4f04754f0..a24f2d59aadd 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/composite/EmbeddedIdInMemoryGeneratedValueTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/composite/EmbeddedIdInMemoryGeneratedValueTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.identifier.composite; +package org.hibernate.orm.test.mapping.identifier.composite; import java.sql.Timestamp; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/composite/Event.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/composite/Event.java similarity index 86% rename from documentation/src/test/java/org/hibernate/userguide/mapping/identifier/composite/Event.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/composite/Event.java index 9edda16317ac..8b3a5948b56e 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/composite/Event.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/composite/Event.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.identifier.composite; +package org.hibernate.orm.test.mapping.identifier.composite; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/composite/EventId.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/composite/EventId.java similarity index 88% rename from documentation/src/test/java/org/hibernate/userguide/mapping/identifier/composite/EventId.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/composite/EventId.java index df630d8a94f0..25cf4163381e 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/composite/EventId.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/composite/EventId.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.identifier.composite; +package org.hibernate.orm.test.mapping.identifier.composite; import java.io.Serializable; import java.sql.Timestamp; diff --git a/documentation/src/test/java/org/hibernate/userguide/immutability/AttributeImmutabilityTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/mutability/attribute/AttributeImmutabilityTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/immutability/AttributeImmutabilityTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/mapping/mutability/attribute/AttributeImmutabilityTest.java index 13d579420f81..3fcdf445d003 100644 --- a/documentation/src/test/java/org/hibernate/userguide/immutability/AttributeImmutabilityTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/mutability/attribute/AttributeImmutabilityTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.immutability; +package org.hibernate.orm.test.mapping.mutability.attribute; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/multitenancy/AbstractMultiTenancyTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/multitenancy/AbstractMultiTenancyTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/multitenancy/AbstractMultiTenancyTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/multitenancy/AbstractMultiTenancyTest.java index 9311ef92a035..9cefa880467b 100644 --- a/documentation/src/test/java/org/hibernate/userguide/multitenancy/AbstractMultiTenancyTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/multitenancy/AbstractMultiTenancyTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.multitenancy; +package org.hibernate.orm.test.multitenancy; import java.io.FileInputStream; import java.io.IOException; diff --git a/documentation/src/test/java/org/hibernate/userguide/multitenancy/ConfigurableMultiTenantConnectionProvider.java b/hibernate-core/src/test/java/org/hibernate/orm/test/multitenancy/ConfigurableMultiTenantConnectionProvider.java similarity index 96% rename from documentation/src/test/java/org/hibernate/userguide/multitenancy/ConfigurableMultiTenantConnectionProvider.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/multitenancy/ConfigurableMultiTenantConnectionProvider.java index a8e7df05c6c6..708b37a07f2f 100644 --- a/documentation/src/test/java/org/hibernate/userguide/multitenancy/ConfigurableMultiTenantConnectionProvider.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/multitenancy/ConfigurableMultiTenantConnectionProvider.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.multitenancy; +package org.hibernate.orm.test.multitenancy; import java.util.HashMap; import java.util.Map; diff --git a/documentation/src/test/java/org/hibernate/userguide/multitenancy/DatabaseMultiTenancyTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/multitenancy/DatabaseMultiTenancyTest.java similarity index 93% rename from documentation/src/test/java/org/hibernate/userguide/multitenancy/DatabaseMultiTenancyTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/multitenancy/DatabaseMultiTenancyTest.java index c90d379b0a52..52ed1da3011d 100644 --- a/documentation/src/test/java/org/hibernate/userguide/multitenancy/DatabaseMultiTenancyTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/multitenancy/DatabaseMultiTenancyTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.multitenancy; +package org.hibernate.orm.test.multitenancy; import org.hibernate.dialect.H2Dialect; diff --git a/documentation/src/test/java/org/hibernate/userguide/multitenancy/DatabaseTimeZoneMultiTenancyTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/multitenancy/DatabaseTimeZoneMultiTenancyTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/multitenancy/DatabaseTimeZoneMultiTenancyTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/multitenancy/DatabaseTimeZoneMultiTenancyTest.java index 634d9b77e324..a058778d08ba 100644 --- a/documentation/src/test/java/org/hibernate/userguide/multitenancy/DatabaseTimeZoneMultiTenancyTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/multitenancy/DatabaseTimeZoneMultiTenancyTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.multitenancy; +package org.hibernate.orm.test.multitenancy; import java.io.FileInputStream; import java.io.IOException; diff --git a/documentation/src/test/java/org/hibernate/userguide/multitenancy/SchemaMultiTenancyTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/multitenancy/SchemaMultiTenancyTest.java similarity index 94% rename from documentation/src/test/java/org/hibernate/userguide/multitenancy/SchemaMultiTenancyTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/multitenancy/SchemaMultiTenancyTest.java index 2a96aa1000c7..eb552ae32830 100644 --- a/documentation/src/test/java/org/hibernate/userguide/multitenancy/SchemaMultiTenancyTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/multitenancy/SchemaMultiTenancyTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.multitenancy; +package org.hibernate.orm.test.multitenancy; import org.hibernate.dialect.H2Dialect; diff --git a/documentation/src/test/java/org/hibernate/userguide/naming/AcmeCorpPhysicalNamingStrategy.java b/hibernate-core/src/test/java/org/hibernate/orm/test/naming/AcmeCorpPhysicalNamingStrategy.java similarity index 86% rename from documentation/src/test/java/org/hibernate/userguide/naming/AcmeCorpPhysicalNamingStrategy.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/naming/AcmeCorpPhysicalNamingStrategy.java index ea4bcf07437f..b411a27b13ae 100644 --- a/documentation/src/test/java/org/hibernate/userguide/naming/AcmeCorpPhysicalNamingStrategy.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/naming/AcmeCorpPhysicalNamingStrategy.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.naming; +package org.hibernate.orm.test.naming; import java.util.Arrays; import java.util.List; @@ -17,7 +17,7 @@ import org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl; import org.hibernate.engine.jdbc.env.spi.JdbcEnvironment; -import org.apache.commons.lang3.StringUtils; +import org.junit.platform.commons.util.StringUtils; /** * An example PhysicalNamingStrategy that implements database object naming standards @@ -43,7 +43,7 @@ public class AcmeCorpPhysicalNamingStrategy extends PhysicalNamingStrategyStanda public Identifier toPhysicalTableName(Identifier logicalName, JdbcEnvironment jdbcEnvironment) { final List parts = splitAndReplace( logicalName.getText()); return jdbcEnvironment.getIdentifierHelper().toIdentifier( - StringUtils.join(parts, '_'), + String.join("_", parts), logicalName.isQuoted() ); } @@ -56,7 +56,7 @@ public Identifier toPhysicalSequenceName(Identifier logicalName, JdbcEnvironment parts.add("seq"); } return jdbcEnvironment.getIdentifierHelper().toIdentifier( - StringUtils.join(parts, '_'), + String.join("_", parts), logicalName.isQuoted() ); } @@ -65,15 +65,19 @@ public Identifier toPhysicalSequenceName(Identifier logicalName, JdbcEnvironment public Identifier toPhysicalColumnName(Identifier logicalName, JdbcEnvironment jdbcEnvironment) { final List parts = splitAndReplace( logicalName.getText()); return jdbcEnvironment.getIdentifierHelper().toIdentifier( - StringUtils.join(parts, '_'), + String.join("_", parts), logicalName.isQuoted() ); } private List splitAndReplace(String name) { - return Arrays.stream(StringUtils.splitByCharacterTypeCamelCase(name)) + return Arrays.stream(splitByCharacterTypeCamelCase(name)) .filter(StringUtils::isNotBlank) .map(p -> ABBREVIATIONS.getOrDefault(p, p).toLowerCase(Locale.ROOT)) .collect(Collectors.toList()); } + + private String[] splitByCharacterTypeCamelCase(String s) { + return s.split( "(?. */ -package org.hibernate.userguide.naming; +package org.hibernate.orm.test.naming; import org.hibernate.boot.model.naming.Identifier; import org.hibernate.boot.registry.StandardServiceRegistry; diff --git a/documentation/src/test/java/org/hibernate/userguide/pc/BytecodeEnhancementTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/BytecodeEnhancementTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/pc/BytecodeEnhancementTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/pc/BytecodeEnhancementTest.java index c8e31959a520..fc9f93547733 100644 --- a/documentation/src/test/java/org/hibernate/userguide/pc/BytecodeEnhancementTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/BytecodeEnhancementTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.pc; +package org.hibernate.orm.test.pc; import java.sql.Blob; import java.util.ArrayList; diff --git a/documentation/src/test/java/org/hibernate/userguide/pc/CascadeDetachTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/CascadeDetachTest.java similarity index 83% rename from documentation/src/test/java/org/hibernate/userguide/pc/CascadeDetachTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/pc/CascadeDetachTest.java index 2c847e734f4c..253c6c308079 100644 --- a/documentation/src/test/java/org/hibernate/userguide/pc/CascadeDetachTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/CascadeDetachTest.java @@ -1,4 +1,10 @@ -package org.hibernate.userguide.pc; +/* + * Hibernate, Relational Persistence for Idiomatic Java + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html + */ +package org.hibernate.orm.test.pc; import org.hibernate.orm.test.jpa.BaseEntityManagerFunctionalTestCase; diff --git a/documentation/src/test/java/org/hibernate/userguide/pc/CascadeLockTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/CascadeLockTest.java similarity index 86% rename from documentation/src/test/java/org/hibernate/userguide/pc/CascadeLockTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/pc/CascadeLockTest.java index 3b9677a6179b..bb59a5860925 100644 --- a/documentation/src/test/java/org/hibernate/userguide/pc/CascadeLockTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/CascadeLockTest.java @@ -1,4 +1,10 @@ -package org.hibernate.userguide.pc; +/* + * Hibernate, Relational Persistence for Idiomatic Java + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html + */ +package org.hibernate.orm.test.pc; import org.hibernate.LockMode; import org.hibernate.LockOptions; diff --git a/documentation/src/test/java/org/hibernate/userguide/pc/CascadeMergeTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/CascadeMergeTest.java similarity index 80% rename from documentation/src/test/java/org/hibernate/userguide/pc/CascadeMergeTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/pc/CascadeMergeTest.java index 806c0a12b235..1652d6a95be8 100644 --- a/documentation/src/test/java/org/hibernate/userguide/pc/CascadeMergeTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/CascadeMergeTest.java @@ -1,4 +1,10 @@ -package org.hibernate.userguide.pc; +/* + * Hibernate, Relational Persistence for Idiomatic Java + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html + */ +package org.hibernate.orm.test.pc; import org.hibernate.orm.test.jpa.BaseEntityManagerFunctionalTestCase; diff --git a/documentation/src/test/java/org/hibernate/userguide/pc/CascadeOnDeleteCollectionTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/CascadeOnDeleteCollectionTest.java similarity index 92% rename from documentation/src/test/java/org/hibernate/userguide/pc/CascadeOnDeleteCollectionTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/pc/CascadeOnDeleteCollectionTest.java index 3c1b3aedd7a8..7eb5bffad464 100644 --- a/documentation/src/test/java/org/hibernate/userguide/pc/CascadeOnDeleteCollectionTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/CascadeOnDeleteCollectionTest.java @@ -1,4 +1,10 @@ -package org.hibernate.userguide.pc; +/* + * Hibernate, Relational Persistence for Idiomatic Java + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html + */ +package org.hibernate.orm.test.pc; import java.util.ArrayList; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/pc/CascadeOnDeleteTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/CascadeOnDeleteTest.java similarity index 91% rename from documentation/src/test/java/org/hibernate/userguide/pc/CascadeOnDeleteTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/pc/CascadeOnDeleteTest.java index 00eaf6336205..b897eef432a1 100644 --- a/documentation/src/test/java/org/hibernate/userguide/pc/CascadeOnDeleteTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/CascadeOnDeleteTest.java @@ -1,4 +1,10 @@ -package org.hibernate.userguide.pc; +/* + * Hibernate, Relational Persistence for Idiomatic Java + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html + */ +package org.hibernate.orm.test.pc; import jakarta.persistence.CascadeType; import jakarta.persistence.Column; diff --git a/documentation/src/test/java/org/hibernate/userguide/pc/CascadePersistTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/CascadePersistTest.java similarity index 75% rename from documentation/src/test/java/org/hibernate/userguide/pc/CascadePersistTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/pc/CascadePersistTest.java index 901aec52511a..de3b235a4934 100644 --- a/documentation/src/test/java/org/hibernate/userguide/pc/CascadePersistTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/CascadePersistTest.java @@ -1,4 +1,10 @@ -package org.hibernate.userguide.pc; +/* + * Hibernate, Relational Persistence for Idiomatic Java + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html + */ +package org.hibernate.orm.test.pc; import org.hibernate.orm.test.jpa.BaseEntityManagerFunctionalTestCase; diff --git a/documentation/src/test/java/org/hibernate/userguide/pc/CascadeRefreshTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/CascadeRefreshTest.java similarity index 82% rename from documentation/src/test/java/org/hibernate/userguide/pc/CascadeRefreshTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/pc/CascadeRefreshTest.java index 5c9daec721bf..c02a2d58954f 100644 --- a/documentation/src/test/java/org/hibernate/userguide/pc/CascadeRefreshTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/CascadeRefreshTest.java @@ -1,4 +1,10 @@ -package org.hibernate.userguide.pc; +/* + * Hibernate, Relational Persistence for Idiomatic Java + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html + */ +package org.hibernate.orm.test.pc; import org.hibernate.orm.test.jpa.BaseEntityManagerFunctionalTestCase; diff --git a/documentation/src/test/java/org/hibernate/userguide/pc/CascadeRemoveTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/CascadeRemoveTest.java similarity index 78% rename from documentation/src/test/java/org/hibernate/userguide/pc/CascadeRemoveTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/pc/CascadeRemoveTest.java index 54978c5d5ec4..04d74ac0dee7 100644 --- a/documentation/src/test/java/org/hibernate/userguide/pc/CascadeRemoveTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/CascadeRemoveTest.java @@ -1,4 +1,10 @@ -package org.hibernate.userguide.pc; +/* + * Hibernate, Relational Persistence for Idiomatic Java + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html + */ +package org.hibernate.orm.test.pc; import org.hibernate.orm.test.jpa.BaseEntityManagerFunctionalTestCase; diff --git a/documentation/src/test/java/org/hibernate/userguide/pc/CascadeReplicateTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/CascadeReplicateTest.java similarity index 82% rename from documentation/src/test/java/org/hibernate/userguide/pc/CascadeReplicateTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/pc/CascadeReplicateTest.java index 924575a18945..16a7b0b712e7 100644 --- a/documentation/src/test/java/org/hibernate/userguide/pc/CascadeReplicateTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/CascadeReplicateTest.java @@ -1,4 +1,10 @@ -package org.hibernate.userguide.pc; +/* + * Hibernate, Relational Persistence for Idiomatic Java + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html + */ +package org.hibernate.orm.test.pc; import org.hibernate.ReplicationMode; import org.hibernate.Session; diff --git a/documentation/src/test/java/org/hibernate/userguide/pc/DynamicUpdateTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/DynamicUpdateTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/pc/DynamicUpdateTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/pc/DynamicUpdateTest.java index 7aff66cd4860..391fdad1ba00 100644 --- a/documentation/src/test/java/org/hibernate/userguide/pc/DynamicUpdateTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/DynamicUpdateTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.pc; +package org.hibernate.orm.test.pc; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/pc/FilterJoinTableTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/FilterJoinTableTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/pc/FilterJoinTableTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/pc/FilterJoinTableTest.java index 350a3a5eae83..1b2bd73be2db 100644 --- a/documentation/src/test/java/org/hibernate/userguide/pc/FilterJoinTableTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/FilterJoinTableTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.pc; +package org.hibernate.orm.test.pc; import java.util.ArrayList; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/pc/FilterSqlFragementAliasTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/FilterSqlFragementAliasTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/pc/FilterSqlFragementAliasTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/pc/FilterSqlFragementAliasTest.java index 6c109b9245bf..05b8670962e3 100644 --- a/documentation/src/test/java/org/hibernate/userguide/pc/FilterSqlFragementAliasTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/FilterSqlFragementAliasTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.pc; +package org.hibernate.orm.test.pc; import java.util.List; import jakarta.persistence.Column; diff --git a/documentation/src/test/java/org/hibernate/userguide/pc/FilterTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/FilterTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/pc/FilterTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/pc/FilterTest.java index 98eef2dc51ca..14595a302205 100644 --- a/documentation/src/test/java/org/hibernate/userguide/pc/FilterTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/FilterTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.pc; +package org.hibernate.orm.test.pc; import java.util.ArrayList; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/pc/MultiLoadIdTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/MultiLoadIdTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/pc/MultiLoadIdTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/pc/MultiLoadIdTest.java index 68e6d28580d8..970269903c66 100644 --- a/documentation/src/test/java/org/hibernate/userguide/pc/MultiLoadIdTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/MultiLoadIdTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.pc; +package org.hibernate.orm.test.pc; import java.util.List; import jakarta.persistence.Entity; @@ -35,7 +35,7 @@ annotatedClasses = { MultiLoadIdTest.Person.class }, integrationSettings = { @Setting(name = AvailableSettings.USE_SECOND_LEVEL_CACHE, value = "true"), - @Setting(name = AvailableSettings.CACHE_REGION_FACTORY, value = "jcache"), + @Setting(name = AvailableSettings.CACHE_REGION_FACTORY, value = "org.hibernate.testing.cache.CachingRegionFactory"), @Setting(name = AvailableSettings.GENERATE_STATISTICS, value = "true"), @Setting( name = AvailableSettings.STATEMENT_INSPECTOR, value = "org.hibernate.testing.jdbc.SQLStatementInspector") } diff --git a/documentation/src/test/java/org/hibernate/userguide/pc/NoDynamicUpdateTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/NoDynamicUpdateTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/pc/NoDynamicUpdateTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/pc/NoDynamicUpdateTest.java index 4bca2078d92f..2761a8d55066 100644 --- a/documentation/src/test/java/org/hibernate/userguide/pc/NoDynamicUpdateTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/NoDynamicUpdateTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.pc; +package org.hibernate.orm.test.pc; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/pc/PersistenceContextTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/PersistenceContextTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/pc/PersistenceContextTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/pc/PersistenceContextTest.java index 069f92500248..68ea9325c185 100644 --- a/documentation/src/test/java/org/hibernate/userguide/pc/PersistenceContextTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/PersistenceContextTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.pc; +package org.hibernate.orm.test.pc; import java.sql.Statement; import java.util.ArrayList; diff --git a/documentation/src/test/java/org/hibernate/userguide/pc/Person.java b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/Person.java similarity index 79% rename from documentation/src/test/java/org/hibernate/userguide/pc/Person.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/pc/Person.java index 5dea334691e5..278ada051a13 100644 --- a/documentation/src/test/java/org/hibernate/userguide/pc/Person.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/Person.java @@ -1,4 +1,10 @@ -package org.hibernate.userguide.pc; +/* + * Hibernate, Relational Persistence for Idiomatic Java + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html + */ +package org.hibernate.orm.test.pc; import java.util.ArrayList; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/pc/Phone.java b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/Phone.java similarity index 78% rename from documentation/src/test/java/org/hibernate/userguide/pc/Phone.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/pc/Phone.java index 74ee29fc846a..fcbea5e54dfa 100644 --- a/documentation/src/test/java/org/hibernate/userguide/pc/Phone.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/Phone.java @@ -1,4 +1,10 @@ -package org.hibernate.userguide.pc; +/* + * Hibernate, Relational Persistence for Idiomatic Java + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html + */ +package org.hibernate.orm.test.pc; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/pc/WhereJoinTableTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/WhereJoinTableTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/pc/WhereJoinTableTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/pc/WhereJoinTableTest.java index f1e4b42fc291..e5d6d97752fb 100644 --- a/documentation/src/test/java/org/hibernate/userguide/pc/WhereJoinTableTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/WhereJoinTableTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.pc; +package org.hibernate.orm.test.pc; import java.sql.Statement; import java.util.ArrayList; diff --git a/documentation/src/test/java/org/hibernate/userguide/pc/WhereTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/WhereTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/pc/WhereTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/pc/WhereTest.java index 7feb1f26b1b5..51f19dddab75 100644 --- a/documentation/src/test/java/org/hibernate/userguide/pc/WhereTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/pc/WhereTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.pc; +package org.hibernate.orm.test.pc; import java.util.ArrayList; import java.util.List; diff --git a/documentation/src/test/java/org/hibernate/userguide/persister/Author.java b/hibernate-core/src/test/java/org/hibernate/orm/test/persister/Author.java similarity index 87% rename from documentation/src/test/java/org/hibernate/userguide/persister/Author.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/persister/Author.java index 9834089ee01f..9dd80c5ce2c3 100644 --- a/documentation/src/test/java/org/hibernate/userguide/persister/Author.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/persister/Author.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.persister; +package org.hibernate.orm.test.persister; import java.util.HashSet; import java.util.Set; diff --git a/documentation/src/test/java/org/hibernate/userguide/persister/Book.java b/hibernate-core/src/test/java/org/hibernate/orm/test/persister/Book.java similarity index 88% rename from documentation/src/test/java/org/hibernate/userguide/persister/Book.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/persister/Book.java index e49d472c55d9..e20a7f357cca 100644 --- a/documentation/src/test/java/org/hibernate/userguide/persister/Book.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/persister/Book.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.persister; +package org.hibernate.orm.test.persister; import jakarta.persistence.Entity; import jakarta.persistence.FetchType; diff --git a/documentation/src/test/java/org/hibernate/userguide/persister/CollectionPersister.java b/hibernate-core/src/test/java/org/hibernate/orm/test/persister/CollectionPersister.java similarity index 86% rename from documentation/src/test/java/org/hibernate/userguide/persister/CollectionPersister.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/persister/CollectionPersister.java index b1cbc85e74af..44bcd02901a9 100644 --- a/documentation/src/test/java/org/hibernate/userguide/persister/CollectionPersister.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/persister/CollectionPersister.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.persister; +package org.hibernate.orm.test.persister; import org.hibernate.MappingException; import org.hibernate.cache.CacheException; diff --git a/documentation/src/test/java/org/hibernate/userguide/persister/EntityPersister.java b/hibernate-core/src/test/java/org/hibernate/orm/test/persister/EntityPersister.java similarity index 86% rename from documentation/src/test/java/org/hibernate/userguide/persister/EntityPersister.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/persister/EntityPersister.java index 2280bc5ecedf..544e8f086497 100644 --- a/documentation/src/test/java/org/hibernate/userguide/persister/EntityPersister.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/persister/EntityPersister.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.persister; +package org.hibernate.orm.test.persister; import org.hibernate.HibernateException; import org.hibernate.cache.spi.access.EntityDataAccess; diff --git a/documentation/src/test/java/org/hibernate/userguide/proxy/ProxyInterfaceTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/proxy/ProxyInterfaceTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/proxy/ProxyInterfaceTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/proxy/ProxyInterfaceTest.java index 6579565d195b..37e73435a7c0 100644 --- a/documentation/src/test/java/org/hibernate/userguide/proxy/ProxyInterfaceTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/proxy/ProxyInterfaceTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.proxy; +package org.hibernate.orm.test.proxy; import jakarta.persistence.Entity; import jakarta.persistence.Id; diff --git a/documentation/src/test/java/org/hibernate/userguide/criteria/CriteriaTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/query/criteria/CriteriaTest.java similarity index 94% rename from documentation/src/test/java/org/hibernate/userguide/criteria/CriteriaTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/query/criteria/CriteriaTest.java index 62303c35aa7d..38a56918ece6 100644 --- a/documentation/src/test/java/org/hibernate/userguide/criteria/CriteriaTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/query/criteria/CriteriaTest.java @@ -4,11 +4,29 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.criteria; +package org.hibernate.orm.test.query.criteria; import java.math.BigDecimal; import java.time.LocalDateTime; import java.util.List; + +import org.hibernate.orm.test.jpa.BaseEntityManagerFunctionalTestCase; +import org.hibernate.testing.orm.domain.userguide.Account; +import org.hibernate.testing.orm.domain.userguide.AddressType; +import org.hibernate.testing.orm.domain.userguide.Call; +import org.hibernate.testing.orm.domain.userguide.CreditCardPayment; +import org.hibernate.testing.orm.domain.userguide.Partner; +import org.hibernate.testing.orm.domain.userguide.Partner_; +import org.hibernate.testing.orm.domain.userguide.Person; +import org.hibernate.testing.orm.domain.userguide.Person_; +import org.hibernate.testing.orm.domain.userguide.Phone; +import org.hibernate.testing.orm.domain.userguide.PhoneType; +import org.hibernate.testing.orm.domain.userguide.Phone_; +import org.hibernate.testing.orm.domain.userguide.WireTransferPayment; + +import org.junit.Before; +import org.junit.Test; + import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Tuple; @@ -22,23 +40,6 @@ import jakarta.persistence.criteria.Predicate; import jakarta.persistence.criteria.Root; -import org.hibernate.orm.test.jpa.BaseEntityManagerFunctionalTestCase; -import org.hibernate.userguide.model.Account; -import org.hibernate.userguide.model.AddressType; -import org.hibernate.userguide.model.Call; -import org.hibernate.userguide.model.CreditCardPayment; -import org.hibernate.userguide.model.Partner; -import org.hibernate.userguide.model.Partner_; -import org.hibernate.userguide.model.Person; -import org.hibernate.userguide.model.Person_; -import org.hibernate.userguide.model.Phone; -import org.hibernate.userguide.model.PhoneType; -import org.hibernate.userguide.model.Phone_; -import org.hibernate.userguide.model.WireTransferPayment; - -import org.junit.Before; -import org.junit.Test; - import static org.hibernate.testing.transaction.TransactionUtil.doInJPA; import static org.junit.Assert.assertEquals; diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/query/criteria/CriteriaTimeoutTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/query/criteria/CriteriaTimeoutTest.java index bfb2e2c40205..ed4bea65b1b8 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/query/criteria/CriteriaTimeoutTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/query/criteria/CriteriaTimeoutTest.java @@ -1,10 +1,3 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later - * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html - */ - /* * Hibernate, Relational Persistence for Idiomatic Java * diff --git a/documentation/src/test/java/org/hibernate/userguide/criteria/PersonWrapper.java b/hibernate-core/src/test/java/org/hibernate/orm/test/query/criteria/PersonWrapper.java similarity index 93% rename from documentation/src/test/java/org/hibernate/userguide/criteria/PersonWrapper.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/query/criteria/PersonWrapper.java index 2c9f6f7614e6..f28710ac0570 100644 --- a/documentation/src/test/java/org/hibernate/userguide/criteria/PersonWrapper.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/query/criteria/PersonWrapper.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.criteria; +package org.hibernate.orm.test.query.criteria; /** * @author Vlad Mihalcea diff --git a/documentation/src/test/java/org/hibernate/userguide/schema/BaseSchemaGeneratorTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/schema/BaseSchemaGeneratorTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/schema/BaseSchemaGeneratorTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/schema/BaseSchemaGeneratorTest.java index decea2958fcd..4a8a85cacd35 100644 --- a/documentation/src/test/java/org/hibernate/userguide/schema/BaseSchemaGeneratorTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/schema/BaseSchemaGeneratorTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.schema; +package org.hibernate.orm.test.schema; import java.sql.Blob; import java.util.ArrayList; diff --git a/documentation/src/test/java/org/hibernate/userguide/schema/CheckTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/schema/CheckTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/schema/CheckTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/schema/CheckTest.java index 4369c3b35229..09b0e4546c4a 100644 --- a/documentation/src/test/java/org/hibernate/userguide/schema/CheckTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/schema/CheckTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.schema; +package org.hibernate.orm.test.schema; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/schema/ColumnDefaultTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/schema/ColumnDefaultTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/schema/ColumnDefaultTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/schema/ColumnDefaultTest.java index 7635bfc7b765..5f4cd681eaea 100644 --- a/documentation/src/test/java/org/hibernate/userguide/schema/ColumnDefaultTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/schema/ColumnDefaultTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.schema; +package org.hibernate.orm.test.schema; import jakarta.persistence.Entity; import jakarta.persistence.Id; diff --git a/documentation/src/test/java/org/hibernate/userguide/schema/H2SchemaGenerationTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/schema/H2SchemaGenerationTest.java similarity index 96% rename from documentation/src/test/java/org/hibernate/userguide/schema/H2SchemaGenerationTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/schema/H2SchemaGenerationTest.java index bbc4cb41a11a..c78ccd7415d5 100644 --- a/documentation/src/test/java/org/hibernate/userguide/schema/H2SchemaGenerationTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/schema/H2SchemaGenerationTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.schema; +package org.hibernate.orm.test.schema; import org.hibernate.cfg.AvailableSettings; import org.hibernate.dialect.H2Dialect; diff --git a/documentation/src/test/java/org/hibernate/userguide/schema/IndexTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/schema/IndexTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/schema/IndexTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/schema/IndexTest.java index fbafefc35804..1f2a6fa04936 100644 --- a/documentation/src/test/java/org/hibernate/userguide/schema/IndexTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/schema/IndexTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.schema; +package org.hibernate.orm.test.schema; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/schema/PostgreSQLSchemaGenerationTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/schema/PostgreSQLSchemaGenerationTest.java similarity index 89% rename from documentation/src/test/java/org/hibernate/userguide/schema/PostgreSQLSchemaGenerationTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/schema/PostgreSQLSchemaGenerationTest.java index f6ed8e4b52b6..d363a14591e1 100644 --- a/documentation/src/test/java/org/hibernate/userguide/schema/PostgreSQLSchemaGenerationTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/schema/PostgreSQLSchemaGenerationTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.schema; +package org.hibernate.orm.test.schema; import org.hibernate.cfg.AvailableSettings; import org.hibernate.dialect.PostgreSQLDialect; @@ -21,7 +21,7 @@ BaseSchemaGeneratorTest.Book.class, BaseSchemaGeneratorTest.Customer.class }, - xmlMappings = "org/hibernate/userguide/schema/SchemaGenerationTest.hbm.xml", + xmlMappings = "org/hibernate/orm/test/schema/SchemaGenerationTest.hbm.xml", integrationSettings = { @Setting(name = AvailableSettings.HBM2DDL_IMPORT_FILES, value = "schema-generation.sql"), @Setting(name = AvailableSettings.HBM2DDL_AUTO, value = "update") diff --git a/documentation/src/test/java/org/hibernate/userguide/schema/SchemaGenerationTest.hbm.xml b/hibernate-core/src/test/java/org/hibernate/orm/test/schema/SchemaGenerationTest.hbm.xml similarity index 100% rename from documentation/src/test/java/org/hibernate/userguide/schema/SchemaGenerationTest.hbm.xml rename to hibernate-core/src/test/java/org/hibernate/orm/test/schema/SchemaGenerationTest.hbm.xml diff --git a/documentation/src/test/java/org/hibernate/userguide/schema/UniqueConstraintTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/schema/UniqueConstraintTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/schema/UniqueConstraintTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/schema/UniqueConstraintTest.java index c60687e2a759..9e0c0e27044d 100644 --- a/documentation/src/test/java/org/hibernate/userguide/schema/UniqueConstraintTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/schema/UniqueConstraintTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.schema; +package org.hibernate.orm.test.schema; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/sql/Captain.java b/hibernate-core/src/test/java/org/hibernate/orm/test/sql/Captain.java similarity index 96% rename from documentation/src/test/java/org/hibernate/userguide/sql/Captain.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/sql/Captain.java index b9de461b589b..3d83bb701bd7 100644 --- a/documentation/src/test/java/org/hibernate/userguide/sql/Captain.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/sql/Captain.java @@ -6,7 +6,7 @@ */ //$Id$ -package org.hibernate.userguide.sql; +package org.hibernate.orm.test.sql; import jakarta.persistence.EmbeddedId; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/sql/CollectionLoaderTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/sql/CollectionLoaderTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/sql/CollectionLoaderTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/sql/CollectionLoaderTest.java index 781e71b05845..74b73fb4e1ac 100644 --- a/documentation/src/test/java/org/hibernate/userguide/sql/CollectionLoaderTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/sql/CollectionLoaderTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.sql; +package org.hibernate.orm.test.sql; import java.sql.Statement; import java.sql.Types; diff --git a/documentation/src/test/java/org/hibernate/userguide/sql/CustomSQLSecondaryTableTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/sql/CustomSQLSecondaryTableTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/sql/CustomSQLSecondaryTableTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/sql/CustomSQLSecondaryTableTest.java index 0154743f44c2..5aac7fd3f468 100644 --- a/documentation/src/test/java/org/hibernate/userguide/sql/CustomSQLSecondaryTableTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/sql/CustomSQLSecondaryTableTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.sql; +package org.hibernate.orm.test.sql; import java.sql.Statement; import jakarta.persistence.Column; diff --git a/documentation/src/test/java/org/hibernate/userguide/sql/CustomSQLTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/sql/CustomSQLTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/sql/CustomSQLTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/sql/CustomSQLTest.java index df797f66fe47..f992d85959a7 100644 --- a/documentation/src/test/java/org/hibernate/userguide/sql/CustomSQLTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/sql/CustomSQLTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.sql; +package org.hibernate.orm.test.sql; import java.sql.Statement; import java.util.ArrayList; diff --git a/documentation/src/test/java/org/hibernate/userguide/sql/Dimensions.java b/hibernate-core/src/test/java/org/hibernate/orm/test/sql/Dimensions.java similarity index 96% rename from documentation/src/test/java/org/hibernate/userguide/sql/Dimensions.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/sql/Dimensions.java index fd50e6c23739..b5d17d0a95a3 100644 --- a/documentation/src/test/java/org/hibernate/userguide/sql/Dimensions.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/sql/Dimensions.java @@ -6,7 +6,7 @@ */ //$Id$ -package org.hibernate.userguide.sql; +package org.hibernate.orm.test.sql; import jakarta.persistence.Embeddable; /** diff --git a/documentation/src/test/java/org/hibernate/userguide/sql/Identity.java b/hibernate-core/src/test/java/org/hibernate/orm/test/sql/Identity.java similarity index 97% rename from documentation/src/test/java/org/hibernate/userguide/sql/Identity.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/sql/Identity.java index 990c60c180f7..281cde38fbc9 100644 --- a/documentation/src/test/java/org/hibernate/userguide/sql/Identity.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/sql/Identity.java @@ -6,7 +6,7 @@ */ //$Id$ -package org.hibernate.userguide.sql; +package org.hibernate.orm.test.sql; import java.io.Serializable; import jakarta.persistence.Embeddable; diff --git a/documentation/src/test/java/org/hibernate/userguide/sql/MySQLStoredProcedureTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/sql/MySQLStoredProcedureTest.java similarity index 92% rename from documentation/src/test/java/org/hibernate/userguide/sql/MySQLStoredProcedureTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/sql/MySQLStoredProcedureTest.java index f2e806fd0415..60ce4d7d4eaf 100644 --- a/documentation/src/test/java/org/hibernate/userguide/sql/MySQLStoredProcedureTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/sql/MySQLStoredProcedureTest.java @@ -1,4 +1,10 @@ -package org.hibernate.userguide.sql; +/* + * Hibernate, Relational Persistence for Idiomatic Java + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html + */ +package org.hibernate.orm.test.sql; import java.sql.CallableStatement; import java.sql.SQLException; @@ -16,14 +22,14 @@ import org.hibernate.query.procedure.ProcedureParameter; import org.hibernate.result.Output; import org.hibernate.result.ResultSetOutput; -import org.hibernate.userguide.model.Account; -import org.hibernate.userguide.model.AddressType; -import org.hibernate.userguide.model.Call; -import org.hibernate.userguide.model.Partner; -import org.hibernate.userguide.model.Payment; -import org.hibernate.userguide.model.Person; -import org.hibernate.userguide.model.Phone; -import org.hibernate.userguide.model.PhoneType; +import org.hibernate.testing.orm.domain.userguide.Account; +import org.hibernate.testing.orm.domain.userguide.AddressType; +import org.hibernate.testing.orm.domain.userguide.Call; +import org.hibernate.testing.orm.domain.userguide.Partner; +import org.hibernate.testing.orm.domain.userguide.Payment; +import org.hibernate.testing.orm.domain.userguide.Person; +import org.hibernate.testing.orm.domain.userguide.Phone; +import org.hibernate.testing.orm.domain.userguide.PhoneType; import org.hibernate.testing.orm.junit.EntityManagerFactoryScope; import org.hibernate.testing.orm.junit.Jpa; diff --git a/documentation/src/test/java/org/hibernate/userguide/sql/OracleCustomSQLWithStoredProcedureTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/sql/OracleCustomSQLWithStoredProcedureTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/sql/OracleCustomSQLWithStoredProcedureTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/sql/OracleCustomSQLWithStoredProcedureTest.java index 3e95a3f46c2c..f37a21303f6a 100644 --- a/documentation/src/test/java/org/hibernate/userguide/sql/OracleCustomSQLWithStoredProcedureTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/sql/OracleCustomSQLWithStoredProcedureTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.sql; +package org.hibernate.orm.test.sql; import java.sql.Statement; diff --git a/documentation/src/test/java/org/hibernate/userguide/sql/OracleStoredProcedureTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/sql/OracleStoredProcedureTest.java similarity index 92% rename from documentation/src/test/java/org/hibernate/userguide/sql/OracleStoredProcedureTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/sql/OracleStoredProcedureTest.java index a86bef16d30b..f241707ecdcd 100644 --- a/documentation/src/test/java/org/hibernate/userguide/sql/OracleStoredProcedureTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/sql/OracleStoredProcedureTest.java @@ -1,6 +1,11 @@ -package org.hibernate.userguide.sql; +/* + * Hibernate, Relational Persistence for Idiomatic Java + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html + */ +package org.hibernate.orm.test.sql; -import java.math.BigDecimal; import java.sql.SQLException; import java.sql.Statement; import java.time.LocalDateTime; @@ -12,14 +17,14 @@ import org.hibernate.query.procedure.ProcedureParameter; import org.hibernate.result.Output; import org.hibernate.result.ResultSetOutput; -import org.hibernate.userguide.model.Account; -import org.hibernate.userguide.model.AddressType; -import org.hibernate.userguide.model.Call; -import org.hibernate.userguide.model.Partner; -import org.hibernate.userguide.model.Payment; -import org.hibernate.userguide.model.Person; -import org.hibernate.userguide.model.Phone; -import org.hibernate.userguide.model.PhoneType; +import org.hibernate.testing.orm.domain.userguide.Account; +import org.hibernate.testing.orm.domain.userguide.AddressType; +import org.hibernate.testing.orm.domain.userguide.Call; +import org.hibernate.testing.orm.domain.userguide.Partner; +import org.hibernate.testing.orm.domain.userguide.Payment; +import org.hibernate.testing.orm.domain.userguide.Person; +import org.hibernate.testing.orm.domain.userguide.Phone; +import org.hibernate.testing.orm.domain.userguide.PhoneType; import org.hibernate.testing.orm.junit.EntityManagerFactoryScope; import org.hibernate.testing.orm.junit.Jpa; diff --git a/documentation/src/test/java/org/hibernate/userguide/sql/PersonSummaryDTO.java b/hibernate-core/src/test/java/org/hibernate/orm/test/sql/PersonSummaryDTO.java similarity index 95% rename from documentation/src/test/java/org/hibernate/userguide/sql/PersonSummaryDTO.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/sql/PersonSummaryDTO.java index 92d6d1e459ce..d5e51168c2da 100644 --- a/documentation/src/test/java/org/hibernate/userguide/sql/PersonSummaryDTO.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/sql/PersonSummaryDTO.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.sql; +package org.hibernate.orm.test.sql; /** * @author Vlad Mihalcea diff --git a/documentation/src/test/java/org/hibernate/userguide/sql/SQLSelectTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/sql/SQLSelectTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/sql/SQLSelectTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/sql/SQLSelectTest.java index 7c29def44fa5..47ec259a1b33 100644 --- a/documentation/src/test/java/org/hibernate/userguide/sql/SQLSelectTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/sql/SQLSelectTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.sql; +package org.hibernate.orm.test.sql; import jakarta.persistence.ElementCollection; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/sql/SQLTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/sql/SQLTest.java similarity index 95% rename from documentation/src/test/java/org/hibernate/userguide/sql/SQLTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/sql/SQLTest.java index ebb796f4843d..3c13cb125f0c 100644 --- a/documentation/src/test/java/org/hibernate/userguide/sql/SQLTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/sql/SQLTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.sql; +package org.hibernate.orm.test.sql; import java.math.BigDecimal; import java.time.LocalDateTime; @@ -21,20 +21,21 @@ import org.hibernate.proxy.HibernateProxy; import org.hibernate.query.TupleTransformer; import org.hibernate.type.StandardBasicTypes; -import org.hibernate.userguide.model.Account; -import org.hibernate.userguide.model.AddressType; -import org.hibernate.userguide.model.Call; -import org.hibernate.userguide.model.CreditCardPayment; -import org.hibernate.userguide.model.Partner; -import org.hibernate.userguide.model.Person; -import org.hibernate.userguide.model.PersonNames; -import org.hibernate.userguide.model.PersonPhoneCount; -import org.hibernate.userguide.model.Phone; -import org.hibernate.userguide.model.PhoneType; -import org.hibernate.userguide.model.WireTransferPayment; +import org.hibernate.testing.orm.domain.userguide.Account; +import org.hibernate.testing.orm.domain.userguide.AddressType; +import org.hibernate.testing.orm.domain.userguide.Call; +import org.hibernate.testing.orm.domain.userguide.CreditCardPayment; +import org.hibernate.testing.orm.domain.userguide.Partner; +import org.hibernate.testing.orm.domain.userguide.Person; +import org.hibernate.testing.orm.domain.userguide.PersonNames; +import org.hibernate.testing.orm.domain.userguide.PersonPhoneCount; +import org.hibernate.testing.orm.domain.userguide.Phone; +import org.hibernate.testing.orm.domain.userguide.PhoneType; +import org.hibernate.testing.orm.domain.userguide.WireTransferPayment; import org.hibernate.testing.RequiresDialect; import org.hibernate.testing.TestForIssue; +import org.junit.Assert; import org.junit.Before; import org.junit.Test; @@ -651,8 +652,8 @@ public void test_sql_jpa_multiple_scalar_values_dto_named_query_example() { .getResultList(); //end::sql-jpa-multiple-scalar-values-dto-named-query-example[] assertEquals(3, personNames.size()); - assertThat( personNames.get(0) ).isNotNull(); - assertThat( personNames.get(0) ).isInstanceOf(PersonNames.class); + assertThat( personNames.get( 0) ).isNotNull(); + assertThat( personNames.get( 0) ).isInstanceOf( PersonNames.class); }); } @@ -679,8 +680,8 @@ public void test_sql_hibernate_multiple_scalar_values_dto_hibernate_named_query_ .getResultList(); //end::sql-hibernate-multiple-scalar-values-dto-hibernate-named-query-example[] assertEquals(2, personNames.size()); - assertEquals(1, personNames.stream().filter(person -> person.getName().equals("John Doe")).map(PersonPhoneCount::getPhoneCount).findAny().get().intValue()); - assertEquals(2, personNames.stream().filter(person -> person.getName().equals("Mrs. John Doe")).map(PersonPhoneCount::getPhoneCount).findAny().get().intValue()); + assertEquals( 1, personNames.stream().filter( person -> person.getName().equals( "John Doe")).map( PersonPhoneCount::getPhoneCount).findAny().get().intValue()); + assertEquals( 2, personNames.stream().filter( person -> person.getName().equals( "Mrs. John Doe")).map( PersonPhoneCount::getPhoneCount).findAny().get().intValue()); }); } diff --git a/documentation/src/test/java/org/hibernate/userguide/sql/SpaceShip.java b/hibernate-core/src/test/java/org/hibernate/orm/test/sql/SpaceShip.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/sql/SpaceShip.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/sql/SpaceShip.java index 857ee0e22c45..6854adf03cbc 100644 --- a/documentation/src/test/java/org/hibernate/userguide/sql/SpaceShip.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/sql/SpaceShip.java @@ -6,7 +6,7 @@ */ //$Id$ -package org.hibernate.userguide.sql; +package org.hibernate.orm.test.sql; import jakarta.persistence.ColumnResult; import jakarta.persistence.Entity; diff --git a/documentation/src/test/java/org/hibernate/userguide/tooling/modelgen/ModelGenTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/tooling/modelgen/ModelGenTests.java similarity index 80% rename from documentation/src/test/java/org/hibernate/userguide/tooling/modelgen/ModelGenTests.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/tooling/modelgen/ModelGenTests.java index 67db9457dcb8..f346542e5ee7 100644 --- a/documentation/src/test/java/org/hibernate/userguide/tooling/modelgen/ModelGenTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/tooling/modelgen/ModelGenTests.java @@ -4,17 +4,17 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.tooling.modelgen; +package org.hibernate.orm.test.tooling.modelgen; import java.math.BigDecimal; import jakarta.persistence.criteria.CriteriaBuilder; import jakarta.persistence.criteria.CriteriaQuery; import jakarta.persistence.criteria.Root; -import org.hibernate.userguide.model.tooling.Customer; -import org.hibernate.userguide.model.tooling.Item; -import org.hibernate.userguide.model.tooling.Order; -import org.hibernate.userguide.model.tooling.Order_; +import org.hibernate.testing.orm.domain.userguide.tooling.Customer; +import org.hibernate.testing.orm.domain.userguide.tooling.Item; +import org.hibernate.testing.orm.domain.userguide.tooling.Order; +import org.hibernate.testing.orm.domain.userguide.tooling.Order_; import org.hibernate.testing.orm.junit.DomainModel; import org.hibernate.testing.orm.junit.SessionFactory; diff --git a/documentation/src/test/java/org/hibernate/userguide/transactions/TransactionsTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/transactions/TransactionsTest.java similarity index 99% rename from documentation/src/test/java/org/hibernate/userguide/transactions/TransactionsTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/transactions/TransactionsTest.java index 54e4fb05ffc0..a29b38cbb3a7 100644 --- a/documentation/src/test/java/org/hibernate/userguide/transactions/TransactionsTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/transactions/TransactionsTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.transactions; +package org.hibernate.orm.test.transactions; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; diff --git a/documentation/src/test/resources/org/hibernate/userguide/mapping/converter/hbm/MoneyConverterHbmTest.hbm.xml b/hibernate-core/src/test/resources/org/hibernate/orm/test/mapping/converter/hbm/MoneyConverterHbmTest.hbm.xml similarity index 54% rename from documentation/src/test/resources/org/hibernate/userguide/mapping/converter/hbm/MoneyConverterHbmTest.hbm.xml rename to hibernate-core/src/test/resources/org/hibernate/orm/test/mapping/converter/hbm/MoneyConverterHbmTest.hbm.xml index e25aad3c88dc..6039dc52840f 100644 --- a/documentation/src/test/resources/org/hibernate/userguide/mapping/converter/hbm/MoneyConverterHbmTest.hbm.xml +++ b/hibernate-core/src/test/resources/org/hibernate/orm/test/mapping/converter/hbm/MoneyConverterHbmTest.hbm.xml @@ -3,14 +3,14 @@ "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> - - + + + type="converted::org.hibernate.orm.test.mapping.converter.hbm.MoneyConverter"/> \ No newline at end of file diff --git a/documentation/src/test/resources/org/hibernate/userguide/mapping/dynamic/Book.hbm.xml b/hibernate-core/src/test/resources/org/hibernate/orm/test/mapping/dynamic/Book.hbm.xml similarity index 100% rename from documentation/src/test/resources/org/hibernate/userguide/mapping/dynamic/Book.hbm.xml rename to hibernate-core/src/test/resources/org/hibernate/orm/test/mapping/dynamic/Book.hbm.xml diff --git a/documentation/src/test/resources/schema-generation.sql b/hibernate-core/src/test/resources/schema-generation.sql similarity index 100% rename from documentation/src/test/resources/schema-generation.sql rename to hibernate-core/src/test/resources/schema-generation.sql diff --git a/documentation/src/test/java/org/hibernate/userguide/envers/CustomRevisionEntityTest.java b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/CustomRevisionEntityTest.java similarity index 81% rename from documentation/src/test/java/org/hibernate/userguide/envers/CustomRevisionEntityTest.java rename to hibernate-envers/src/test/java/org/hibernate/orm/test/envers/CustomRevisionEntityTest.java index df43e922b472..f22aec121e99 100644 --- a/documentation/src/test/java/org/hibernate/userguide/envers/CustomRevisionEntityTest.java +++ b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/CustomRevisionEntityTest.java @@ -4,52 +4,42 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.envers; +package org.hibernate.orm.test.envers; import java.util.Date; -import java.util.List; -import java.util.Map; -import jakarta.persistence.Column; -import jakarta.persistence.Entity; -import jakarta.persistence.Id; -import jakarta.persistence.NoResultException; -import jakarta.persistence.Table; -import jakarta.persistence.Temporal; -import jakarta.persistence.TemporalType; import org.hibernate.annotations.CreationTimestamp; import org.hibernate.envers.Audited; import org.hibernate.envers.DefaultRevisionEntity; import org.hibernate.envers.RevisionEntity; import org.hibernate.envers.RevisionListener; -import org.hibernate.orm.test.jpa.BaseEntityManagerFunctionalTestCase; -import org.junit.Test; +import org.hibernate.testing.orm.junit.EntityManagerFactoryScope; +import org.hibernate.testing.orm.junit.Jpa; -import static org.hibernate.testing.transaction.TransactionUtil.doInJPA; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.fail; +import org.junit.jupiter.api.Test; + +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; +import jakarta.persistence.Temporal; +import jakarta.persistence.TemporalType; /** * @author Vlad Mihalcea */ -public class CustomRevisionEntityTest extends BaseEntityManagerFunctionalTestCase { - - @Override - protected Class[] getAnnotatedClasses() { - return new Class[] { - Customer.class, - CustomRevisionEntity.class - }; - } - +@Jpa(annotatedClasses = { + CustomRevisionEntityTest.Customer.class, + CustomRevisionEntityTest.CustomRevisionEntity.class +}) +public class CustomRevisionEntityTest { @Test - public void test() { + public void test(EntityManagerFactoryScope scope) { //tag::envers-revisionlog-RevisionEntity-persist-example[] CurrentUser.INSTANCE.logIn("Vlad Mihalcea"); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { Customer customer = new Customer(); customer.setId(1L); customer.setFirstName("John"); diff --git a/documentation/src/test/java/org/hibernate/userguide/envers/DefaultAuditTest.java b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/DefaultAuditTest.java similarity index 82% rename from documentation/src/test/java/org/hibernate/userguide/envers/DefaultAuditTest.java rename to hibernate-envers/src/test/java/org/hibernate/orm/test/envers/DefaultAuditTest.java index c326003ae804..ba1c03df19e1 100644 --- a/documentation/src/test/java/org/hibernate/userguide/envers/DefaultAuditTest.java +++ b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/DefaultAuditTest.java @@ -4,10 +4,20 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.envers; +package org.hibernate.orm.test.envers; import java.util.Date; import java.util.List; + +import org.hibernate.annotations.CreationTimestamp; +import org.hibernate.envers.AuditReaderFactory; +import org.hibernate.envers.Audited; + +import org.hibernate.testing.orm.junit.EntityManagerFactoryScope; +import org.hibernate.testing.orm.junit.Jpa; + +import org.junit.jupiter.api.Test; + import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.Id; @@ -15,14 +25,6 @@ import jakarta.persistence.Temporal; import jakarta.persistence.TemporalType; -import org.hibernate.annotations.CreationTimestamp; -import org.hibernate.envers.AuditReaderFactory; -import org.hibernate.envers.Audited; -import org.hibernate.orm.test.jpa.BaseEntityManagerFunctionalTestCase; - -import org.junit.Test; - -import static org.hibernate.testing.transaction.TransactionUtil.doInJPA; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import static org.junit.Assert.fail; @@ -30,18 +32,11 @@ /** * @author Vlad Mihalcea */ -public class DefaultAuditTest extends BaseEntityManagerFunctionalTestCase { - - @Override - protected Class[] getAnnotatedClasses() { - return new Class[] { - Customer.class - }; - } - +@Jpa(annotatedClasses = DefaultAuditTest.Customer.class) +public class DefaultAuditTest { @Test - public void test() { - doInJPA(this::entityManagerFactory, entityManager -> { + public void test(EntityManagerFactoryScope scope) { + scope.inTransaction( entityManager -> { //tag::envers-audited-insert-example[] Customer customer = new Customer(); customer.setId(1L); @@ -52,14 +47,14 @@ public void test() { //end::envers-audited-insert-example[] }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { //tag::envers-audited-update-example[] Customer customer = entityManager.find(Customer.class, 1L); customer.setLastName("Doe Jr."); //end::envers-audited-update-example[] }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { //tag::envers-audited-delete-example[] Customer customer = entityManager.getReference(Customer.class, 1L); entityManager.remove(customer); @@ -67,7 +62,7 @@ public void test() { }); //tag::envers-audited-revisions-example[] - List revisions = doInJPA(this::entityManagerFactory, entityManager -> { + List revisions = scope.fromTransaction( entityManager -> { return AuditReaderFactory.get(entityManager).getRevisions( Customer.class, 1L @@ -75,7 +70,7 @@ public void test() { }); //end::envers-audited-revisions-example[] - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { //tag::envers-audited-rev1-example[] Customer customer = (Customer) AuditReaderFactory .get(entityManager) @@ -87,7 +82,7 @@ public void test() { //end::envers-audited-rev1-example[] }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { //tag::envers-audited-rev2-example[] Customer customer = (Customer) AuditReaderFactory .get(entityManager) @@ -99,7 +94,7 @@ public void test() { //end::envers-audited-rev2-example[] }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { //tag::envers-audited-rev3-example[] try { Customer customer = (Customer) AuditReaderFactory @@ -115,7 +110,7 @@ public void test() { //end::envers-audited-rev3-example[] }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { //tag::envers-audited-rev4-example[] Customer customer = (Customer) AuditReaderFactory .get(entityManager) diff --git a/documentation/src/test/java/org/hibernate/userguide/envers/EntityTypeChangeAuditDefaultTrackingTest.java b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/EntityTypeChangeAuditDefaultTrackingTest.java similarity index 89% rename from documentation/src/test/java/org/hibernate/userguide/envers/EntityTypeChangeAuditDefaultTrackingTest.java rename to hibernate-envers/src/test/java/org/hibernate/orm/test/envers/EntityTypeChangeAuditDefaultTrackingTest.java index 19ceebc8d915..796cdcc48266 100644 --- a/documentation/src/test/java/org/hibernate/userguide/envers/EntityTypeChangeAuditDefaultTrackingTest.java +++ b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/EntityTypeChangeAuditDefaultTrackingTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.envers; +package org.hibernate.orm.test.envers; import java.util.Arrays; import java.util.Date; @@ -24,8 +24,9 @@ import org.hibernate.envers.DefaultTrackingModifiedEntitiesRevisionEntity; import org.hibernate.envers.RevisionEntity; import org.hibernate.jpa.boot.spi.Bootstrap; -import org.hibernate.orm.test.jpa.BaseEntityManagerFunctionalTestCase; +import org.hibernate.testing.orm.junit.EntityManagerFactoryBasedFunctionalTest; +import org.hibernate.testing.transaction.TransactionUtil; import org.junit.Test; import static org.hibernate.testing.transaction.TransactionUtil.doInJPA; @@ -33,7 +34,7 @@ /** * @author Vlad Mihalcea */ -public class EntityTypeChangeAuditDefaultTrackingTest extends BaseEntityManagerFunctionalTestCase { +public class EntityTypeChangeAuditDefaultTrackingTest extends EntityManagerFactoryBasedFunctionalTest { @Override protected Class[] getAnnotatedClasses() { @@ -45,8 +46,9 @@ protected Class[] getAnnotatedClasses() { @Test public void testLifecycle() { + final EntityManagerFactory testEmf = produceEntityManagerFactory(); - doInJPA(this::entityManagerFactory, entityManager -> { + TransactionUtil.doInJPA( () -> testEmf, entityManager -> { Customer customer = new Customer(); customer.setId(1L); customer.setFirstName("John"); @@ -88,9 +90,10 @@ public void testLifecycle() { }); } finally { - if (entityManagerFactory != null) { + if ( entityManagerFactory != null ) { entityManagerFactory.close(); } + testEmf.close(); } } diff --git a/documentation/src/test/java/org/hibernate/userguide/envers/EntityTypeChangeAuditTest.java b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/EntityTypeChangeAuditTest.java similarity index 92% rename from documentation/src/test/java/org/hibernate/userguide/envers/EntityTypeChangeAuditTest.java rename to hibernate-envers/src/test/java/org/hibernate/orm/test/envers/EntityTypeChangeAuditTest.java index 47d89db27977..654c311d7547 100644 --- a/documentation/src/test/java/org/hibernate/userguide/envers/EntityTypeChangeAuditTest.java +++ b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/EntityTypeChangeAuditTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.envers; +package org.hibernate.orm.test.envers; import java.util.Arrays; import java.util.Date; @@ -31,8 +31,8 @@ import org.hibernate.envers.ModifiedEntityNames; import org.hibernate.envers.RevisionEntity; import org.hibernate.jpa.boot.spi.Bootstrap; -import org.hibernate.orm.test.jpa.BaseEntityManagerFunctionalTestCase; +import org.hibernate.testing.orm.junit.EntityManagerFactoryBasedFunctionalTest; import org.junit.Test; import static org.hibernate.testing.transaction.TransactionUtil.doInJPA; @@ -41,7 +41,7 @@ /** * @author Vlad Mihalcea */ -public class EntityTypeChangeAuditTest extends BaseEntityManagerFunctionalTestCase { +public class EntityTypeChangeAuditTest extends EntityManagerFactoryBasedFunctionalTest { @Override protected Class[] getAnnotatedClasses() { @@ -53,8 +53,9 @@ protected Class[] getAnnotatedClasses() { @Test public void test() { + final EntityManagerFactory testEmf = produceEntityManagerFactory(); - doInJPA(this::entityManagerFactory, entityManager -> { + doInJPA( () -> testEmf, entityManager -> { Customer customer = new Customer(); customer.setId(1L); customer.setFirstName("John"); @@ -63,10 +64,10 @@ public void test() { entityManager.persist(customer); }); - doInJPA(this::entityManagerFactory, entityManager -> { + doInJPA( () -> testEmf, entityManager -> { //tag::envers-tracking-modified-entities-queries-example1[] assertEquals( - "org.hibernate.userguide.envers.EntityTypeChangeAuditTest$Customer", + "org.hibernate.orm.test.envers.EntityTypeChangeAuditTest$Customer", AuditReaderFactory .get(entityManager) .getCrossTypeRevisionChangesReader() @@ -106,7 +107,7 @@ public void test() { doInJPA(() -> emf, entityManager -> { //tag::envers-tracking-modified-entities-queries-example2[] assertEquals( - "org.hibernate.userguide.envers.EntityTypeChangeAuditTest$ApplicationCustomer", + "org.hibernate.orm.test.envers.EntityTypeChangeAuditTest$ApplicationCustomer", AuditReaderFactory .get(entityManager) .getCrossTypeRevisionChangesReader() @@ -121,6 +122,7 @@ public void test() { if (entityManagerFactory != null) { entityManagerFactory.close(); } + testEmf.close(); } } diff --git a/documentation/src/test/java/org/hibernate/userguide/envers/EntityTypeChangeAuditTrackingRevisionListenerTest.java b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/EntityTypeChangeAuditTrackingRevisionListenerTest.java similarity index 96% rename from documentation/src/test/java/org/hibernate/userguide/envers/EntityTypeChangeAuditTrackingRevisionListenerTest.java rename to hibernate-envers/src/test/java/org/hibernate/orm/test/envers/EntityTypeChangeAuditTrackingRevisionListenerTest.java index b005dd130e2c..5e42271793fb 100644 --- a/documentation/src/test/java/org/hibernate/userguide/envers/EntityTypeChangeAuditTrackingRevisionListenerTest.java +++ b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/EntityTypeChangeAuditTrackingRevisionListenerTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.envers; +package org.hibernate.orm.test.envers; import java.util.Arrays; import java.util.Date; @@ -12,17 +12,6 @@ import java.util.List; import java.util.Map; import java.util.Set; -import jakarta.persistence.CascadeType; -import jakarta.persistence.Column; -import jakarta.persistence.Entity; -import jakarta.persistence.EntityManagerFactory; -import jakarta.persistence.GeneratedValue; -import jakarta.persistence.Id; -import jakarta.persistence.ManyToOne; -import jakarta.persistence.OneToMany; -import jakarta.persistence.Table; -import jakarta.persistence.Temporal; -import jakarta.persistence.TemporalType; import org.hibernate.annotations.CreationTimestamp; import org.hibernate.cfg.AvailableSettings; @@ -36,18 +25,29 @@ import org.hibernate.envers.RevisionTimestamp; import org.hibernate.envers.RevisionType; import org.hibernate.jpa.boot.spi.Bootstrap; -import org.hibernate.orm.test.jpa.BaseEntityManagerFunctionalTestCase; +import org.hibernate.testing.orm.junit.EntityManagerFactoryBasedFunctionalTest; import org.junit.Test; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.EntityManagerFactory; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; +import jakarta.persistence.Temporal; +import jakarta.persistence.TemporalType; + import static org.hibernate.testing.transaction.TransactionUtil.doInJPA; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; /** * @author Vlad Mihalcea */ -public class EntityTypeChangeAuditTrackingRevisionListenerTest extends BaseEntityManagerFunctionalTestCase { +public class EntityTypeChangeAuditTrackingRevisionListenerTest extends EntityManagerFactoryBasedFunctionalTest { @Override protected Class[] getAnnotatedClasses() { @@ -60,8 +60,9 @@ protected Class[] getAnnotatedClasses() { @Test public void testLifecycle() { + final EntityManagerFactory testEmf = produceEntityManagerFactory(); - doInJPA(this::entityManagerFactory, entityManager -> { + doInJPA( () -> testEmf, entityManager -> { Customer customer = new Customer(); customer.setId(1L); customer.setFirstName("John"); @@ -130,6 +131,7 @@ public void testLifecycle() { if (entityManagerFactory != null) { entityManagerFactory.close(); } + testEmf.close(); } } diff --git a/documentation/src/test/java/org/hibernate/userguide/envers/ModifiedFlagsAuditTest.java b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/ModifiedFlagsAuditTest.java similarity index 73% rename from documentation/src/test/java/org/hibernate/userguide/envers/ModifiedFlagsAuditTest.java rename to hibernate-envers/src/test/java/org/hibernate/orm/test/envers/ModifiedFlagsAuditTest.java index 31b0d01c513b..469ed05d49f1 100644 --- a/documentation/src/test/java/org/hibernate/userguide/envers/ModifiedFlagsAuditTest.java +++ b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/ModifiedFlagsAuditTest.java @@ -4,43 +4,31 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.envers; +package org.hibernate.orm.test.envers; import java.util.Date; -import java.util.List; -import jakarta.persistence.Column; -import jakarta.persistence.Entity; -import jakarta.persistence.Id; -import jakarta.persistence.NoResultException; -import jakarta.persistence.Temporal; -import jakarta.persistence.TemporalType; import org.hibernate.annotations.CreationTimestamp; import org.hibernate.envers.Audited; -import org.hibernate.orm.test.jpa.BaseEntityManagerFunctionalTestCase; -import org.junit.Test; +import org.hibernate.testing.orm.junit.EntityManagerFactoryScope; +import org.hibernate.testing.orm.junit.Jpa; +import org.junit.jupiter.api.Test; -import static org.hibernate.testing.transaction.TransactionUtil.doInJPA; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.fail; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Temporal; +import jakarta.persistence.TemporalType; /** * @author Vlad Mihalcea */ -public class ModifiedFlagsAuditTest extends BaseEntityManagerFunctionalTestCase { - - @Override - protected Class[] getAnnotatedClasses() { - return new Class[] { - Customer.class - }; - } - +@Jpa(annotatedClasses = ModifiedFlagsAuditTest.Customer.class) +public class ModifiedFlagsAuditTest { @Test - public void test() { - doInJPA(this::entityManagerFactory, entityManager -> { + public void test(EntityManagerFactoryScope scope) { + scope.inTransaction( entityManager -> { Customer customer = new Customer(); customer.setId(1L); customer.setFirstName("John"); @@ -49,7 +37,7 @@ public void test() { entityManager.persist(customer); }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { //tag::envers-tracking-properties-changes-example[] Customer customer = entityManager.find(Customer.class, 1L); customer.setLastName("Doe Jr."); diff --git a/documentation/src/test/java/org/hibernate/userguide/envers/QueryAuditAdressCountryTest.java b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/QueryAuditAdressCountryTest.java similarity index 86% rename from documentation/src/test/java/org/hibernate/userguide/envers/QueryAuditAdressCountryTest.java rename to hibernate-envers/src/test/java/org/hibernate/orm/test/envers/QueryAuditAdressCountryTest.java index 414bf8500a7f..c86943c1e82f 100644 --- a/documentation/src/test/java/org/hibernate/userguide/envers/QueryAuditAdressCountryTest.java +++ b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/QueryAuditAdressCountryTest.java @@ -4,19 +4,10 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.envers; +package org.hibernate.orm.test.envers; import java.util.Date; import java.util.List; -import java.util.Map; -import jakarta.persistence.Column; -import jakarta.persistence.Entity; -import jakarta.persistence.FetchType; -import jakarta.persistence.Id; -import jakarta.persistence.ManyToOne; -import jakarta.persistence.Temporal; -import jakarta.persistence.TemporalType; -import jakarta.persistence.criteria.JoinType; import org.hibernate.annotations.CreationTimestamp; import org.hibernate.dialect.HSQLDialect; @@ -24,42 +15,40 @@ import org.hibernate.envers.Audited; import org.hibernate.envers.configuration.EnversSettings; import org.hibernate.envers.query.AuditEntity; -import org.hibernate.envers.strategy.internal.ValidityAuditStrategy; -import org.hibernate.orm.test.jpa.BaseEntityManagerFunctionalTestCase; import org.hibernate.testing.SkipForDialect; -import org.junit.Test; +import org.hibernate.testing.orm.junit.EntityManagerFactoryScope; +import org.hibernate.testing.orm.junit.Jpa; +import org.hibernate.testing.orm.junit.Setting; +import org.hibernate.testing.transaction.TransactionUtil; +import org.junit.jupiter.api.Test; + +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.Id; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Temporal; +import jakarta.persistence.TemporalType; +import jakarta.persistence.criteria.JoinType; -import static org.hibernate.testing.transaction.TransactionUtil.doInJPA; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; /** * @author Vlad Mihalcea */ -public class QueryAuditAdressCountryTest extends BaseEntityManagerFunctionalTestCase { - - @Override - protected Class[] getAnnotatedClasses() { - return new Class[] { - Customer.class, - Address.class, - Country.class - }; - } - - @Override - protected void addConfigOptions(Map options) { - options.put( - EnversSettings.AUDIT_STRATEGY, - ValidityAuditStrategy.class.getName() - ); - } - +@Jpa(annotatedClasses = { + QueryAuditAdressCountryTest.Customer.class, + QueryAuditAdressCountryTest.Address.class, + QueryAuditAdressCountryTest.Country.class +}, integrationSettings = { + @Setting(name = EnversSettings.AUDIT_STRATEGY, value = "org.hibernate.envers.strategy.ValidityAuditStrategy") +}) +public class QueryAuditAdressCountryTest { @Test @SkipForDialect(value = HSQLDialect.class, comment = "No idea why this fails. Looks like a HSQLDB bug") - public void test() { - doInJPA(this::entityManagerFactory, entityManager -> { + public void test(EntityManagerFactoryScope scope) { + scope.inTransaction( entityManager -> { Country country = new Country(); country.setId(1L); country.setName("România"); @@ -82,7 +71,7 @@ public void test() { entityManager.persist(customer); }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { //tag::envers-querying-entity-relation-nested-join-restriction[] List customers = AuditReaderFactory .get(entityManager) @@ -97,7 +86,7 @@ public void test() { //end::envers-querying-entity-relation-nested-join-restriction[] }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { //tag::envers-querying-entity-relation-join-multiple-restrictions[] List customers = AuditReaderFactory .get(entityManager) @@ -116,7 +105,7 @@ public void test() { assertEquals(1, customers.size()); }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { //tag::envers-querying-entity-relation-nested-join-multiple-restrictions[] List customers = AuditReaderFactory .get(entityManager) @@ -138,7 +127,7 @@ public void test() { assertEquals(1, customers.size()); }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { //tag::envers-querying-entity-relation-nested-join-multiple-restrictions-combined-entities[] Customer customer = entityManager.createQuery( "select c " + @@ -157,7 +146,8 @@ public void test() { //end::envers-querying-entity-relation-nested-join-multiple-restrictions-combined-entities[] }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { + //tag::envers-querying-entity-relation-nested-join-multiple-restrictions-combined[] List revisions = AuditReaderFactory.get(entityManager).getRevisions( diff --git a/documentation/src/test/java/org/hibernate/userguide/envers/QueryAuditTest.java b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/QueryAuditTest.java similarity index 84% rename from documentation/src/test/java/org/hibernate/userguide/envers/QueryAuditTest.java rename to hibernate-envers/src/test/java/org/hibernate/orm/test/envers/QueryAuditTest.java index 88640c193559..8ad370f61897 100644 --- a/documentation/src/test/java/org/hibernate/userguide/envers/QueryAuditTest.java +++ b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/QueryAuditTest.java @@ -4,22 +4,13 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.envers; +package org.hibernate.orm.test.envers; import java.sql.Timestamp; import java.time.LocalDateTime; import java.time.ZoneOffset; import java.util.Date; import java.util.List; -import java.util.Map; -import jakarta.persistence.Column; -import jakarta.persistence.Entity; -import jakarta.persistence.FetchType; -import jakarta.persistence.Id; -import jakarta.persistence.ManyToOne; -import jakarta.persistence.Temporal; -import jakarta.persistence.TemporalType; -import jakarta.persistence.criteria.JoinType; import org.hibernate.annotations.CreationTimestamp; import org.hibernate.envers.AuditReaderFactory; @@ -27,39 +18,37 @@ import org.hibernate.envers.configuration.EnversSettings; import org.hibernate.envers.query.AuditEntity; import org.hibernate.envers.query.AuditQuery; -import org.hibernate.envers.strategy.internal.ValidityAuditStrategy; -import org.hibernate.orm.test.jpa.BaseEntityManagerFunctionalTestCase; -import org.junit.Test; +import org.hibernate.testing.orm.junit.EntityManagerFactoryScope; +import org.hibernate.testing.orm.junit.Jpa; +import org.hibernate.testing.orm.junit.Setting; +import org.junit.jupiter.api.Test; + +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.Id; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Temporal; +import jakarta.persistence.TemporalType; +import jakarta.persistence.criteria.JoinType; -import static org.hibernate.testing.transaction.TransactionUtil.doInJPA; import static org.junit.Assert.assertEquals; /** * @author Vlad Mihalcea * @author Chris Cranford */ -public class QueryAuditTest extends BaseEntityManagerFunctionalTestCase { - - @Override - protected Class[] getAnnotatedClasses() { - return new Class[] { - Customer.class, - Address.class - }; - } - - @Override - protected void addConfigOptions(Map options) { - options.put( - EnversSettings.AUDIT_STRATEGY, - ValidityAuditStrategy.class.getName() - ); - } - +@Jpa(annotatedClasses = { + QueryAuditTest.Customer.class, + QueryAuditTest.Address.class +}, integrationSettings = { + @Setting(name = EnversSettings.AUDIT_STRATEGY, value = "org.hibernate.envers.strategy.ValidityAuditStrategy") +}) +public class QueryAuditTest { @Test - public void test() { - doInJPA(this::entityManagerFactory, entityManager -> { + public void test(EntityManagerFactoryScope scope) { + scope.inTransaction( entityManager -> { Address address = new Address(); address.setId(1L); address.setCountry("România"); @@ -77,24 +66,24 @@ public void test() { entityManager.persist(customer); }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { Customer customer = entityManager.find(Customer.class, 1L); customer.setLastName("Doe Jr."); }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { Customer customer = entityManager.getReference(Customer.class, 1L); entityManager.remove(customer); }); - List revisions = doInJPA(this::entityManagerFactory, entityManager -> { + List revisions = scope.fromTransaction( entityManager -> { return AuditReaderFactory.get(entityManager).getRevisions( Customer.class, 1L ); }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { //tag::entities-at-revision-example[] Customer customer = (Customer) AuditReaderFactory .get(entityManager) @@ -106,7 +95,7 @@ public void test() { //end::entities-at-revision-example[] }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { //tag::entities-filtering-example[] List customers = AuditReaderFactory .get(entityManager) @@ -121,7 +110,7 @@ public void test() { //end::entities-filtering-example[] }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { //tag::entities-filtering-by-entity-example[] Address address = entityManager.getReference(Address.class, 1L); @@ -136,7 +125,7 @@ public void test() { //end::entities-filtering-by-entity-example[] }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { //tag::entities-filtering-by-entity-identifier-example[] List customers = AuditReaderFactory .get(entityManager) @@ -149,7 +138,7 @@ public void test() { //end::entities-filtering-by-entity-identifier-example[] }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { //tag::entities-in-clause-filtering-by-entity-identifier-example[] List customers = AuditReaderFactory .get(entityManager) @@ -162,7 +151,7 @@ public void test() { //end::entities-in-clause-filtering-by-entity-identifier-example[] }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { //tag::entities-filtering-and-pagination[] List customers = AuditReaderFactory .get(entityManager) @@ -178,7 +167,7 @@ public void test() { //end::entities-filtering-and-pagination[] }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { //tag::revisions-of-entity-query-example[] AuditQuery query = AuditReaderFactory.get(entityManager) .createQuery() @@ -186,7 +175,7 @@ public void test() { //end::revisions-of-entity-query-example[] }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { //tag::revisions-of-entity-query-by-revision-number-example[] Number revision = (Number) AuditReaderFactory .get(entityManager) @@ -201,7 +190,7 @@ public void test() { assertEquals(3, revision); }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { //tag::revisions-of-entity-query-minimize-example[] Number revision = (Number) AuditReaderFactory .get(entityManager) @@ -228,7 +217,7 @@ public void test() { assertEquals(1, revision); }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { { //tag::envers-querying-entity-relation-inner-join[] AuditQuery innerJoinAuditQuery = AuditReaderFactory @@ -249,7 +238,7 @@ public void test() { } }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { //tag::envers-querying-entity-relation-join-restriction[] List customers = AuditReaderFactory .get(entityManager) @@ -263,7 +252,7 @@ public void test() { assertEquals(1, customers.size()); }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { //tag::aggregate-max-revision-with-entity-example[] List results = AuditReaderFactory .get(entityManager) diff --git a/documentation/src/test/java/org/hibernate/userguide/envers/QueryAuditWithModifiedFlagTest.java b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/QueryAuditWithModifiedFlagTest.java similarity index 82% rename from documentation/src/test/java/org/hibernate/userguide/envers/QueryAuditWithModifiedFlagTest.java rename to hibernate-envers/src/test/java/org/hibernate/orm/test/envers/QueryAuditWithModifiedFlagTest.java index 66dbcfda8edd..a2977d5a5961 100644 --- a/documentation/src/test/java/org/hibernate/userguide/envers/QueryAuditWithModifiedFlagTest.java +++ b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/QueryAuditWithModifiedFlagTest.java @@ -4,57 +4,46 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.envers; +package org.hibernate.orm.test.envers; import java.util.Date; import java.util.List; -import java.util.Map; -import jakarta.persistence.Column; -import jakarta.persistence.Entity; -import jakarta.persistence.FetchType; -import jakarta.persistence.Id; -import jakarta.persistence.ManyToOne; -import jakarta.persistence.Temporal; -import jakarta.persistence.TemporalType; import org.hibernate.annotations.CreationTimestamp; import org.hibernate.envers.AuditReaderFactory; import org.hibernate.envers.Audited; import org.hibernate.envers.configuration.EnversSettings; import org.hibernate.envers.query.AuditEntity; -import org.hibernate.envers.strategy.internal.ValidityAuditStrategy; -import org.hibernate.orm.test.jpa.BaseEntityManagerFunctionalTestCase; -import org.junit.Test; +import org.hibernate.testing.orm.junit.EntityManagerFactoryScope; +import org.hibernate.testing.orm.junit.Jpa; +import org.hibernate.testing.orm.junit.Setting; +import org.junit.jupiter.api.Test; + +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.Id; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Temporal; +import jakarta.persistence.TemporalType; -import static org.hibernate.testing.transaction.TransactionUtil.doInJPA; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; /** * @author Vlad Mihalcea */ -public class QueryAuditWithModifiedFlagTest extends BaseEntityManagerFunctionalTestCase { - - @Override - protected Class[] getAnnotatedClasses() { - return new Class[] { - Customer.class, - Address.class - }; - } - - @Override - protected void addConfigOptions(Map options) { - options.put( - EnversSettings.AUDIT_STRATEGY, - ValidityAuditStrategy.class.getName() - ); - } - +@Jpa(annotatedClasses = { + QueryAuditWithModifiedFlagTest.Customer.class, + QueryAuditWithModifiedFlagTest.Address.class +}, integrationSettings = { + @Setting(name = EnversSettings.AUDIT_STRATEGY, value = "org.hibernate.envers.strategy.ValidityAuditStrategy") +}) +public class QueryAuditWithModifiedFlagTest { @Test - public void test() { - doInJPA(this::entityManagerFactory, entityManager -> { + public void test(EntityManagerFactoryScope scope) { + scope.inTransaction( entityManager -> { Address address = new Address(); address.setId(1L); address.setCountry("România"); @@ -72,17 +61,17 @@ public void test() { entityManager.persist(customer); }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { Customer customer = entityManager.find(Customer.class, 1L); customer.setLastName("Doe Jr."); }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { Customer customer = entityManager.getReference(Customer.class, 1L); entityManager.remove(customer); }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { //tag::envers-tracking-properties-changes-queries-hasChanged-example[] List customers = AuditReaderFactory .get(entityManager) @@ -96,7 +85,7 @@ public void test() { assertEquals(3, customers.size()); }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { //tag::envers-tracking-properties-changes-queries-hasChanged-and-hasNotChanged-example[] List customers = AuditReaderFactory .get(entityManager) @@ -111,7 +100,7 @@ public void test() { assertEquals(1, customers.size()); }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { //tag::envers-tracking-properties-changes-queries-at-revision-example[] Customer customer = (Customer) AuditReaderFactory .get(entityManager) diff --git a/documentation/src/test/java/org/hibernate/userguide/envers/ValidityStrategyAuditTest.java b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/ValidityStrategyAuditTest.java similarity index 80% rename from documentation/src/test/java/org/hibernate/userguide/envers/ValidityStrategyAuditTest.java rename to hibernate-envers/src/test/java/org/hibernate/orm/test/envers/ValidityStrategyAuditTest.java index 7afe7d5c48e4..cac8c26fe44c 100644 --- a/documentation/src/test/java/org/hibernate/userguide/envers/ValidityStrategyAuditTest.java +++ b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/ValidityStrategyAuditTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.envers; +package org.hibernate.orm.test.envers; import java.util.Date; import java.util.List; @@ -15,9 +15,11 @@ import org.hibernate.envers.Audited; import org.hibernate.envers.configuration.EnversSettings; import org.hibernate.envers.strategy.internal.ValidityAuditStrategy; -import org.hibernate.orm.test.jpa.BaseEntityManagerFunctionalTestCase; -import org.junit.Test; +import org.hibernate.testing.orm.junit.EntityManagerFactoryScope; +import org.hibernate.testing.orm.junit.Jpa; +import org.hibernate.testing.orm.junit.Setting; +import org.junit.jupiter.api.Test; import jakarta.persistence.Column; import jakarta.persistence.Entity; @@ -26,7 +28,6 @@ import jakarta.persistence.Temporal; import jakarta.persistence.TemporalType; -import static org.hibernate.testing.transaction.TransactionUtil.doInJPA; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import static org.junit.Assert.fail; @@ -34,16 +35,12 @@ /** * @author Vlad Mihalcea */ -public class ValidityStrategyAuditTest extends BaseEntityManagerFunctionalTestCase { - - @Override - protected Class[] getAnnotatedClasses() { - return new Class[] { - Customer.class - }; - } - - @Override +@Jpa(annotatedClasses = { + ValidityStrategyAuditTest.Customer.class +}, integrationSettings = { + @Setting(name = EnversSettings.AUDIT_STRATEGY, value = "org.hibernate.envers.strategy.ValidityAuditStrategy") +}) +public class ValidityStrategyAuditTest { protected void addConfigOptions(Map options) { //tag::envers-audited-validity-configuration-example[] options.put( @@ -54,8 +51,8 @@ protected void addConfigOptions(Map options) { } @Test - public void test() { - doInJPA(this::entityManagerFactory, entityManager -> { + public void test(EntityManagerFactoryScope scope) { + scope.inTransaction( entityManager -> { Customer customer = new Customer(); customer.setId(1L); customer.setFirstName("John"); @@ -64,24 +61,24 @@ public void test() { entityManager.persist(customer); }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { Customer customer = entityManager.find(Customer.class, 1L); customer.setLastName("Doe Jr."); }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { Customer customer = entityManager.getReference(Customer.class, 1L); entityManager.remove(customer); }); - List revisions = doInJPA(this::entityManagerFactory, entityManager -> { + List revisions = scope.fromTransaction( entityManager -> { return AuditReaderFactory.get(entityManager).getRevisions( Customer.class, 1L ); }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { Customer customer = (Customer) AuditReaderFactory .get(entityManager) .createQuery() @@ -91,7 +88,7 @@ public void test() { assertEquals("Doe", customer.getLastName()); }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { Customer customer = (Customer) AuditReaderFactory .get(entityManager) .createQuery() @@ -101,7 +98,7 @@ public void test() { assertEquals("Doe Jr.", customer.getLastName()); }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { try { Customer customer = (Customer) AuditReaderFactory .get(entityManager) @@ -115,7 +112,7 @@ public void test() { } }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { Customer customer = (Customer) AuditReaderFactory .get(entityManager) .createQuery() diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/CacheableNaturalIdTest.java b/hibernate-jcache/src/test/java/org/hibernate/orm/test/caching/CacheableNaturalIdTest.java similarity index 64% rename from documentation/src/test/java/org/hibernate/userguide/mapping/identifier/CacheableNaturalIdTest.java rename to hibernate-jcache/src/test/java/org/hibernate/orm/test/caching/CacheableNaturalIdTest.java index a4a50ccfaec3..a6a0a764318e 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/CacheableNaturalIdTest.java +++ b/hibernate-jcache/src/test/java/org/hibernate/orm/test/caching/CacheableNaturalIdTest.java @@ -1,65 +1,55 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.mapping.identifier; +package org.hibernate.orm.test.caching; -import java.util.Map; +import javax.cache.configuration.MutableConfiguration; import org.hibernate.Session; import org.hibernate.annotations.NaturalId; import org.hibernate.annotations.NaturalIdCache; import org.hibernate.cache.jcache.JCacheHelper; import org.hibernate.cfg.AvailableSettings; -import org.hibernate.orm.test.jpa.BaseEntityManagerFunctionalTestCase; -import org.junit.Test; +import org.hibernate.testing.orm.junit.EntityManagerFactoryScope; +import org.hibernate.testing.orm.junit.Jpa; +import org.hibernate.testing.orm.junit.Setting; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; import jakarta.persistence.Entity; import jakarta.persistence.Id; -import javax.cache.configuration.MutableConfiguration; - -import static org.hibernate.testing.transaction.TransactionUtil.doInJPA; import static org.junit.Assert.assertEquals; /** * @author Vlad Mihalcea */ -public class CacheableNaturalIdTest extends BaseEntityManagerFunctionalTestCase { +@Jpa( + annotatedClasses = CacheableNaturalIdTest.Book.class, + integrationSettings = { + @Setting(name = AvailableSettings.USE_SECOND_LEVEL_CACHE, value = "true"), + @Setting(name = AvailableSettings.CACHE_REGION_FACTORY, value = "jcache"), + @Setting(name = AvailableSettings.USE_QUERY_CACHE, value = "true"), + @Setting(name = AvailableSettings.GENERATE_STATISTICS, value = "true"), + @Setting(name = AvailableSettings.CACHE_REGION_PREFIX, value = "") + } +) +public class CacheableNaturalIdTest { - @Override - public void buildEntityManagerFactory() { + @BeforeAll + public void setUp(EntityManagerFactoryScope scope) { JCacheHelper.locateStandardCacheManager().createCache("default-update-timestamps-region", new MutableConfiguration<>()); JCacheHelper.locateStandardCacheManager().createCache("default-query-results-region", new MutableConfiguration<>()); JCacheHelper.locateStandardCacheManager().createCache("org.hibernate.userguide.mapping.identifier.CacheableNaturalIdTest$Book##NaturalId", new MutableConfiguration<>()); -// JCacheHelper.locateStandardCacheManager().createCache("", new MutableConfiguration<>()); - - super.buildEntityManagerFactory(); - } - - @Override - protected Class[] getAnnotatedClasses() { - return new Class[] { - Book.class - }; - } - - @Override - @SuppressWarnings("unchecked") - protected void addConfigOptions(Map options) { - options.put(AvailableSettings.USE_SECOND_LEVEL_CACHE, Boolean.TRUE.toString()); - options.put(AvailableSettings.CACHE_REGION_FACTORY, "jcache"); - options.put(AvailableSettings.USE_QUERY_CACHE, Boolean.TRUE.toString()); - options.put(AvailableSettings.GENERATE_STATISTICS, Boolean.TRUE.toString()); - options.put(AvailableSettings.CACHE_REGION_PREFIX, ""); } @Test - public void test() { - doInJPA(this::entityManagerFactory, entityManager -> { + public void test(EntityManagerFactoryScope scope) { + scope.inTransaction( entityManager -> { Book book = new Book(); book.setId(1L); book.setTitle("High-Performance Java Persistence"); @@ -68,7 +58,7 @@ public void test() { entityManager.persist(book); }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { //tag::naturalid-cacheable-load-access-example[] Book book = entityManager .unwrap(Session.class) diff --git a/documentation/src/test/java/org/hibernate/userguide/caching/FirstLevelCacheTest.java b/hibernate-jcache/src/test/java/org/hibernate/orm/test/caching/FirstLevelCacheTest.java similarity index 69% rename from documentation/src/test/java/org/hibernate/userguide/caching/FirstLevelCacheTest.java rename to hibernate-jcache/src/test/java/org/hibernate/orm/test/caching/FirstLevelCacheTest.java index 766812558012..156b90349a10 100644 --- a/documentation/src/test/java/org/hibernate/userguide/caching/FirstLevelCacheTest.java +++ b/hibernate-jcache/src/test/java/org/hibernate/orm/test/caching/FirstLevelCacheTest.java @@ -4,53 +4,49 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.caching; +package org.hibernate.orm.test.caching; import java.util.ArrayList; import java.util.List; -import java.util.Map; import org.hibernate.Session; import org.hibernate.cfg.AvailableSettings; -import org.hibernate.orm.test.jpa.BaseEntityManagerFunctionalTestCase; -import org.junit.Test; +import org.hibernate.testing.orm.junit.EntityManagerFactoryScope; +import org.hibernate.testing.orm.junit.Jpa; +import org.hibernate.testing.orm.junit.Setting; + +import org.junit.jupiter.api.Test; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.GenerationType; import jakarta.persistence.Id; -import static org.hibernate.testing.transaction.TransactionUtil.doInJPA; - /** * @author Vlad Mihalcea */ -public class FirstLevelCacheTest extends BaseEntityManagerFunctionalTestCase { - - @Override - protected Class[] getAnnotatedClasses() { - return new Class[] { Person.class }; - } - @Override - @SuppressWarnings("unchecked") - protected void addConfigOptions(Map options) { - options.put(AvailableSettings.USE_SECOND_LEVEL_CACHE, Boolean.TRUE.toString()); - options.put(AvailableSettings.CACHE_REGION_FACTORY, "jcache"); - } - - @Test - public void testCache() { - Person aPerson = doInJPA(this::entityManagerFactory, entityManager -> { - entityManager.persist(new Person()); - entityManager.persist(new Person()); +@Jpa( + annotatedClasses = FirstLevelCacheTest.Person.class, + integrationSettings = { + @Setting(name = AvailableSettings.USE_SECOND_LEVEL_CACHE, value = "true"), + @Setting(name = AvailableSettings.CACHE_REGION_FACTORY, value = "jcache") + } +) +public class FirstLevelCacheTest { + + @Test + public void testCache(EntityManagerFactoryScope scope) { + final Person aPerson = new Person(); + scope.inTransaction(entityManager -> { + entityManager.persist(new Person()); + entityManager.persist(new Person()); Person person = new Person(); entityManager.persist(person); - return person; }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { List dtos = new ArrayList<>(); //tag::caching-management-jpa-detach-example[] for(Person person : entityManager.createQuery("select p from Person p", Person.class) @@ -71,7 +67,7 @@ public void testCache() { //end::caching-management-contains-example[] }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { List dtos = new ArrayList<>(); //tag::caching-management-native-evict-example[] Session session = entityManager.unwrap(Session.class); diff --git a/documentation/src/test/java/org/hibernate/userguide/caching/NonStrictReadWriteCacheTest.java b/hibernate-jcache/src/test/java/org/hibernate/orm/test/caching/NonStrictReadWriteCacheTest.java similarity index 78% rename from documentation/src/test/java/org/hibernate/userguide/caching/NonStrictReadWriteCacheTest.java rename to hibernate-jcache/src/test/java/org/hibernate/orm/test/caching/NonStrictReadWriteCacheTest.java index a47aff4c09c7..b22005514481 100644 --- a/documentation/src/test/java/org/hibernate/userguide/caching/NonStrictReadWriteCacheTest.java +++ b/hibernate-jcache/src/test/java/org/hibernate/orm/test/caching/NonStrictReadWriteCacheTest.java @@ -4,18 +4,23 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.caching; +package org.hibernate.orm.test.caching; import java.util.ArrayList; import java.util.List; -import java.util.Map; +import javax.cache.configuration.MutableConfiguration; import org.hibernate.annotations.CacheConcurrencyStrategy; import org.hibernate.cache.jcache.JCacheHelper; import org.hibernate.cfg.AvailableSettings; -import org.hibernate.orm.test.jpa.BaseEntityManagerFunctionalTestCase; -import org.junit.Test; +import org.hibernate.testing.orm.junit.EntityManagerFactoryScope; +import org.hibernate.testing.orm.junit.Jpa; +import org.hibernate.testing.orm.junit.Setting; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +import org.jboss.logging.Logger; import jakarta.persistence.Cacheable; import jakarta.persistence.CascadeType; @@ -27,18 +32,25 @@ import jakarta.persistence.OneToMany; import jakarta.persistence.Version; -import javax.cache.configuration.MutableConfiguration; - -import static org.hibernate.testing.transaction.TransactionUtil.doInJPA; - /** * @author Vlad Mihalcea */ -public class NonStrictReadWriteCacheTest extends BaseEntityManagerFunctionalTestCase { +@Jpa( + annotatedClasses = { + NonStrictReadWriteCacheTest.Person.class, + NonStrictReadWriteCacheTest.Phone.class + }, + integrationSettings = { + @Setting(name = AvailableSettings.USE_SECOND_LEVEL_CACHE, value = "true"), + @Setting(name = AvailableSettings.CACHE_REGION_FACTORY, value = "jcache"), + } +) +public class NonStrictReadWriteCacheTest { + private final Logger log = Logger.getLogger( NonStrictReadWriteCacheTest.class ); - @Override - public void buildEntityManagerFactory() { + @BeforeAll + public void setUp(EntityManagerFactoryScope scope) { JCacheHelper.locateStandardCacheManager().createCache( "hibernate.test.org.hibernate.userguide.caching.NonStrictReadWriteCacheTest$Person", new MutableConfiguration<>() @@ -51,28 +63,11 @@ public void buildEntityManagerFactory() { "hibernate.test.org.hibernate.userguide.caching.NonStrictReadWriteCacheTest$Person.phones", new MutableConfiguration<>() ); - - super.buildEntityManagerFactory(); } - @Override - protected Class[] getAnnotatedClasses() { - return new Class[] { - Person.class, - Phone.class - }; - } - - @Override - @SuppressWarnings("unchecked") - protected void addConfigOptions(Map options) { - options.put(AvailableSettings.USE_SECOND_LEVEL_CACHE, Boolean.TRUE.toString()); - options.put(AvailableSettings.CACHE_REGION_FACTORY, "jcache"); - } - @Test - public void testCache() { - doInJPA(this::entityManagerFactory, entityManager -> { + public void testCache(EntityManagerFactoryScope scope) { + scope.inTransaction( entityManager -> { Person person = new Person(); entityManager.persist(person); Phone home = new Phone("123-456-7890"); @@ -80,18 +75,18 @@ public void testCache() { person.addPhone(home); person.addPhone(office); }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { Person person = entityManager.find(Person.class, 1L); person.getPhones().size(); }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { log.info("Log collection from cache"); //tag::caching-collection-example[] Person person = entityManager.find(Person.class, 1L); person.getPhones().size(); //end::caching-collection-example[] }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { log.info("Load from cache"); entityManager.find(Person.class, 1L).getPhones().size(); }); diff --git a/documentation/src/test/java/org/hibernate/userguide/caching/SecondLevelCacheTest.java b/hibernate-jcache/src/test/java/org/hibernate/orm/test/caching/SecondLevelCacheTest.java similarity index 81% rename from documentation/src/test/java/org/hibernate/userguide/caching/SecondLevelCacheTest.java rename to hibernate-jcache/src/test/java/org/hibernate/orm/test/caching/SecondLevelCacheTest.java index f599a825e935..52ebfb0e9418 100644 --- a/documentation/src/test/java/org/hibernate/userguide/caching/SecondLevelCacheTest.java +++ b/hibernate-jcache/src/test/java/org/hibernate/orm/test/caching/SecondLevelCacheTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.caching; +package org.hibernate.orm.test.caching; import java.util.HashMap; import java.util.List; @@ -15,11 +15,16 @@ import org.hibernate.annotations.CacheConcurrencyStrategy; import org.hibernate.annotations.NaturalId; import org.hibernate.cfg.AvailableSettings; -import org.hibernate.orm.test.jpa.BaseEntityManagerFunctionalTestCase; import org.hibernate.stat.CacheRegionStatistics; import org.hibernate.stat.Statistics; -import org.junit.Test; +import org.hibernate.testing.orm.junit.EntityManagerFactoryScope; +import org.hibernate.testing.orm.junit.Jpa; +import org.hibernate.testing.orm.junit.Setting; + +import org.junit.jupiter.api.Test; + +import org.jboss.logging.Logger; import jakarta.persistence.CacheRetrieveMode; import jakarta.persistence.CacheStoreMode; @@ -32,50 +37,42 @@ import static org.hibernate.jpa.HibernateHints.HINT_CACHEABLE; import static org.hibernate.jpa.HibernateHints.HINT_CACHE_REGION; -import static org.hibernate.testing.transaction.TransactionUtil.doInJPA; import static org.junit.Assert.assertNotNull; /** * @author Vlad Mihalcea */ -public class SecondLevelCacheTest extends BaseEntityManagerFunctionalTestCase { - - @Override - protected Class[] getAnnotatedClasses() { - return new Class[] { - Person.class - }; - } - - @Override - @SuppressWarnings("unchecked") - protected void addConfigOptions(Map options) { - options.put(AvailableSettings.USE_SECOND_LEVEL_CACHE, Boolean.TRUE.toString()); - options.put(AvailableSettings.CACHE_REGION_FACTORY, "jcache"); - options.put(AvailableSettings.USE_QUERY_CACHE, Boolean.TRUE.toString()); - options.put(AvailableSettings.GENERATE_STATISTICS, Boolean.TRUE.toString()); - } +@Jpa( + annotatedClasses = SecondLevelCacheTest.Person.class, + integrationSettings = { + @Setting(name = AvailableSettings.USE_SECOND_LEVEL_CACHE, value = "true"), + @Setting(name = AvailableSettings.CACHE_REGION_FACTORY, value = "jcache"), + @Setting(name = AvailableSettings.USE_QUERY_CACHE, value = "true"), + @Setting(name = AvailableSettings.GENERATE_STATISTICS, value = "true") + } +) +public class SecondLevelCacheTest { + private final Logger log = Logger.getLogger( SecondLevelCacheTest.class ); @Test - public void testCache() { - doInJPA(this::entityManagerFactory, entityManager -> { + public void testCache(EntityManagerFactoryScope scope) { + scope.inTransaction( entityManager -> { entityManager.persist(new Person()); Person aPerson= new Person(); aPerson.setName("John Doe"); aPerson.setCode("unique-code"); entityManager.persist(aPerson); - return aPerson; }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { log.info("Jpa load by id"); //tag::caching-entity-jpa-example[] Person person = entityManager.find(Person.class, 1L); //end::caching-entity-jpa-example[] }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { log.info("Native load by id"); Session session = entityManager.unwrap(Session.class); //tag::caching-entity-native-example[] @@ -83,7 +80,7 @@ public void testCache() { //end::caching-entity-native-example[] }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { log.info("Native load by natural-id"); Session session = entityManager.unwrap(Session.class); //tag::caching-entity-natural-id-example[] @@ -95,7 +92,7 @@ public void testCache() { assertNotNull(person); }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { log.info("Jpa query cache"); //tag::caching-query-jpa-example[] List persons = entityManager.createQuery( @@ -108,7 +105,7 @@ public void testCache() { //end::caching-query-jpa-example[] }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { log.info("Native query cache"); Session session = entityManager.unwrap(Session.class); //tag::caching-query-native-example[] @@ -122,7 +119,7 @@ public void testCache() { //end::caching-query-native-example[] }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { log.info("Jpa query cache region"); //tag::caching-query-region-jpa-example[] List persons = entityManager.createQuery( @@ -135,7 +132,7 @@ public void testCache() { .getResultList(); //end::caching-query-region-jpa-example[] }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { log.info("Native query cache"); Session session = entityManager.unwrap(Session.class); //tag::caching-query-region-native-example[] @@ -150,7 +147,7 @@ public void testCache() { //end::caching-query-region-native-example[] }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { log.info("Jpa query cache store mode "); //tag::caching-query-region-store-mode-jpa-example[] List persons = entityManager.createQuery( @@ -164,7 +161,7 @@ public void testCache() { .getResultList(); //end::caching-query-region-store-mode-jpa-example[] }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { log.info("Native query cache store mode"); Session session = entityManager.unwrap(Session.class); //tag::caching-query-region-store-mode-native-example[] @@ -180,7 +177,7 @@ public void testCache() { //end::caching-query-region-store-mode-native-example[] }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { Session session = entityManager.unwrap(Session.class); //tag::caching-statistics-example[] Statistics statistics = session.getSessionFactory().getStatistics(); @@ -190,10 +187,9 @@ public void testCache() { long missCount = secondLevelCacheStatistics.getMissCount(); double hitRatio = (double) hitCount / (hitCount + missCount); //end::caching-statistics-example[] - return hitRatio; }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { log.info("Native query cache store mode"); Session session = entityManager.unwrap(Session.class); //tag::caching-query-region-native-evict-example[] @@ -201,7 +197,7 @@ public void testCache() { //end::caching-query-region-native-evict-example[] }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { //tag::caching-management-cache-mode-entity-jpa-example[] Map hints = new HashMap<>(); hints.put("jakarta.persistence.cache.retrieveMode" , CacheRetrieveMode.USE); @@ -210,7 +206,7 @@ public void testCache() { //end::caching-management-cache-mode-entity-jpa-example[] }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { Session session = entityManager.unwrap(Session.class); //tag::caching-management-cache-mode-entity-native-example[] session.setCacheMode(CacheMode.REFRESH); @@ -218,7 +214,7 @@ public void testCache() { //end::caching-management-cache-mode-entity-native-example[] }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { //tag::caching-management-cache-mode-query-jpa-example[] List persons = entityManager.createQuery( "select p from Person p", Person.class) @@ -233,7 +229,7 @@ public void testCache() { //end::caching-management-evict-jpa-example[] }); - doInJPA(this::entityManagerFactory, entityManager -> { + scope.inTransaction( entityManager -> { Session session = entityManager.unwrap(Session.class); //tag::caching-management-cache-mode-query-native-example[] List persons = session.createQuery( diff --git a/documentation/src/test/java/org/hibernate/userguide/spatial/SpatialTest.java b/hibernate-spatial/src/test/java/org/hibernate/spatial/testing/SpatialTest.java similarity index 98% rename from documentation/src/test/java/org/hibernate/userguide/spatial/SpatialTest.java rename to hibernate-spatial/src/test/java/org/hibernate/spatial/testing/SpatialTest.java index 6e9522f16400..2aa0c0f7f678 100644 --- a/documentation/src/test/java/org/hibernate/userguide/spatial/SpatialTest.java +++ b/hibernate-spatial/src/test/java/org/hibernate/spatial/testing/SpatialTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.spatial; +package org.hibernate.spatial.testing; import jakarta.persistence.Entity; import jakarta.persistence.Id; diff --git a/hibernate-testing/hibernate-testing.gradle b/hibernate-testing/hibernate-testing.gradle index ee66881a639e..7c9d1f04f1af 100644 --- a/hibernate-testing/hibernate-testing.gradle +++ b/hibernate-testing/hibernate-testing.gradle @@ -43,6 +43,8 @@ dependencies { implementation libs.hcann implementation libs.jandex implementation testLibs.wildFlyTxnClient + + annotationProcessor project( ':hibernate-jpamodelgen' ) } tasks.checkstyleMain { diff --git a/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/StandardDomainModel.java b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/StandardDomainModel.java index f5b3e67d5dca..140e2857bab8 100644 --- a/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/StandardDomainModel.java +++ b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/StandardDomainModel.java @@ -11,6 +11,7 @@ import org.hibernate.testing.orm.domain.gambit.GambitDomainModel; import org.hibernate.testing.orm.domain.helpdesk.HelpDeskDomainModel; import org.hibernate.testing.orm.domain.retail.RetailDomainModel; +import org.hibernate.testing.orm.domain.userguide.UserguideDomainModel; /** * @author Steve Ebersole @@ -20,7 +21,8 @@ public enum StandardDomainModel { ANIMAL( AnimalDomainModel.INSTANCE ), GAMBIT( GambitDomainModel.INSTANCE ), HELPDESK( HelpDeskDomainModel.INSTANCE ), - RETAIL( RetailDomainModel.INSTANCE ); + RETAIL( RetailDomainModel.INSTANCE ), + USERGUIDE( UserguideDomainModel.INSTANCE ); private final DomainModelDescriptor domainModel; diff --git a/documentation/src/main/java/org/hibernate/userguide/model/Account.java b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/Account.java similarity index 55% rename from documentation/src/main/java/org/hibernate/userguide/model/Account.java rename to hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/Account.java index b52ee043fae5..dd556c83d965 100644 --- a/documentation/src/main/java/org/hibernate/userguide/model/Account.java +++ b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/Account.java @@ -4,7 +4,10 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.model; +package org.hibernate.testing.orm.domain.userguide; + +import java.util.ArrayList; +import java.util.List; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; @@ -12,30 +15,27 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.OneToMany; -import java.util.ArrayList; -import java.util.List; - @Entity public class Account { - @Id - @GeneratedValue - long id; + @Id + @GeneratedValue + long id; - @ManyToOne - Person owner; + @ManyToOne + Person owner; - @OneToMany(mappedBy = "account") - List payments = new ArrayList<>(); + @OneToMany(mappedBy = "account") + List payments = new ArrayList<>(); - public List getPayments() { - return payments; - } + public List getPayments() { + return payments; + } - public Person getOwner() { - return owner; - } + public Person getOwner() { + return owner; + } - public void setOwner(Person owner) { - this.owner = owner; - } + public void setOwner(Person owner) { + this.owner = owner; + } } diff --git a/documentation/src/main/java/org/hibernate/userguide/model/AddressType.java b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/AddressType.java similarity index 85% rename from documentation/src/main/java/org/hibernate/userguide/model/AddressType.java rename to hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/AddressType.java index b5bc887e5910..9aded56dfcc9 100644 --- a/documentation/src/main/java/org/hibernate/userguide/model/AddressType.java +++ b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/AddressType.java @@ -4,14 +4,14 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.model; +package org.hibernate.testing.orm.domain.userguide; /** * @author Vlad Mihalcea */ //tag::hql-examples-domain-model-example[] public enum AddressType { - HOME, - OFFICE + HOME, + OFFICE } //end::hql-examples-domain-model-example[] diff --git a/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/Call.java b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/Call.java new file mode 100644 index 000000000000..9b2fe2ee119a --- /dev/null +++ b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/Call.java @@ -0,0 +1,87 @@ +/* + * Hibernate, Relational Persistence for Idiomatic Java + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later. + * See the lgpl.txt file in the root directory or . + */ +package org.hibernate.testing.orm.domain.userguide; + +import java.time.LocalDateTime; + +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; + +/** + * @author Vlad Mihalcea + */ +//tag::hql-examples-domain-model-example[] +@Entity +@Table(name = "phone_call") +public class Call { + + @Id + @GeneratedValue + private Long id; + + @ManyToOne + private Phone phone; + + @Column(name = "call_timestamp") + private LocalDateTime timestamp; + + private int duration; + + @ManyToOne + private Payment payment; + + //Getters and setters are omitted for brevity + + //end::hql-examples-domain-model-example[] + public Call() {} + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Phone getPhone() { + return phone; + } + + public void setPhone(Phone phone) { + this.phone = phone; + } + + public LocalDateTime getTimestamp() { + return timestamp; + } + + public void setTimestamp(LocalDateTime timestamp) { + this.timestamp = timestamp; + } + + public int getDuration() { + return duration; + } + + public void setDuration(int duration) { + this.duration = duration; + } + + public Payment getPayment() { + return payment; + } + + public void setPayment(Payment payment) { + this.payment = payment; + } + //tag::hql-examples-domain-model-example[] +} +//end::hql-examples-domain-model-example[] diff --git a/documentation/src/main/java/org/hibernate/userguide/model/CreditCardPayment.java b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/CreditCardPayment.java similarity index 66% rename from documentation/src/main/java/org/hibernate/userguide/model/CreditCardPayment.java rename to hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/CreditCardPayment.java index d9c9a48d45b0..14bba33e11cc 100644 --- a/documentation/src/main/java/org/hibernate/userguide/model/CreditCardPayment.java +++ b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/CreditCardPayment.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.model; +package org.hibernate.testing.orm.domain.userguide; import jakarta.persistence.Entity; @@ -14,14 +14,14 @@ //tag::hql-examples-domain-model-example[] @Entity public class CreditCardPayment extends Payment { - String cardNumber; + String cardNumber; - public void setCardNumber(String cardNumber) { - this.cardNumber = cardNumber; - } + public void setCardNumber(String cardNumber) { + this.cardNumber = cardNumber; + } - public String getCardNumber() { - return cardNumber; - } + public String getCardNumber() { + return cardNumber; + } } //end::hql-examples-domain-model-example[] diff --git a/documentation/src/main/java/org/hibernate/userguide/model/Image.java b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/Image.java similarity index 93% rename from documentation/src/main/java/org/hibernate/userguide/model/Image.java rename to hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/Image.java index f5a07a7690b9..875a088c660b 100644 --- a/documentation/src/main/java/org/hibernate/userguide/model/Image.java +++ b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/Image.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.model; +package org.hibernate.testing.orm.domain.userguide; import jakarta.persistence.Basic; import jakarta.persistence.Entity; diff --git a/documentation/src/main/java/org/hibernate/userguide/model/Partner.java b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/Partner.java similarity index 94% rename from documentation/src/main/java/org/hibernate/userguide/model/Partner.java rename to hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/Partner.java index 40ce8c606d01..96a562026ab0 100644 --- a/documentation/src/main/java/org/hibernate/userguide/model/Partner.java +++ b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/Partner.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.model; +package org.hibernate.testing.orm.domain.userguide; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; diff --git a/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/Payment.java b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/Payment.java new file mode 100644 index 000000000000..2b33b3bb9622 --- /dev/null +++ b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/Payment.java @@ -0,0 +1,85 @@ +/* + * Hibernate, Relational Persistence for Idiomatic Java + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later. + * See the lgpl.txt file in the root directory or . + */ +package org.hibernate.testing.orm.domain.userguide; + +import java.math.BigDecimal; + +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.Inheritance; +import jakarta.persistence.InheritanceType; +import jakarta.persistence.ManyToOne; + +/** + * @author Vlad Mihalcea + */ +//tag::hql-examples-domain-model-example[] +@Entity +@Inheritance(strategy = InheritanceType.JOINED) +public class Payment { + + @Id + @GeneratedValue + private Long id; + + private BigDecimal amount; + + private boolean completed; + + @ManyToOne + private Account account; + + @ManyToOne + private Person person; + + //Getters and setters are omitted for brevity + +//end::hql-examples-domain-model-example[] + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public BigDecimal getAmount() { + return amount; + } + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + public boolean isCompleted() { + return completed; + } + + public void setCompleted(boolean completed) { + this.completed = completed; + } + + public Person getPerson() { + return person; + } + + public void setPerson(Person person) { + this.person = person; + } + + public Account getAccount() { + return account; + } + + public void setAccount(Account account) { + this.account = account; + } + //tag::hql-examples-domain-model-example[] +} +//end::hql-examples-domain-model-example[] diff --git a/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/Person.java b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/Person.java new file mode 100644 index 000000000000..13738bb897dd --- /dev/null +++ b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/Person.java @@ -0,0 +1,269 @@ +/* + * Hibernate, Relational Persistence for Idiomatic Java + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later. + * See the lgpl.txt file in the root directory or . + */ +package org.hibernate.testing.orm.domain.userguide; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import jakarta.persistence.CascadeType; +import jakarta.persistence.ColumnResult; +import jakarta.persistence.ConstructorResult; +import jakarta.persistence.ElementCollection; +import jakarta.persistence.Entity; +import jakarta.persistence.EntityResult; +import jakarta.persistence.EnumType; +import jakarta.persistence.FieldResult; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.MapKeyEnumerated; +import jakarta.persistence.NamedNativeQuery; +import jakarta.persistence.NamedQuery; +import jakarta.persistence.NamedStoredProcedureQuery; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderColumn; +import jakarta.persistence.ParameterMode; +import jakarta.persistence.QueryHint; +import jakarta.persistence.SqlResultSetMapping; +import jakarta.persistence.StoredProcedureParameter; +import jakarta.persistence.Version; + +/** + * @author Vlad Mihalcea + */ +//tag::sql-scalar-NamedNativeQuery-example[] +@NamedNativeQuery( + name = "find_person_name", + query = + "SELECT name " + + "FROM Person ", + resultClass = String.class +) +//end::sql-scalar-NamedNativeQuery-example[] +//tag::sql-multiple-scalar-values-NamedNativeQuery-example[] +@NamedNativeQuery( + name = "find_person_name_and_nickName", + query = + "SELECT " + + " name, " + + " nickName " + + "FROM Person " +) +//end::sql-multiple-scalar-values-NamedNativeQuery-example[] +// tag::sql-multiple-scalar-values-dto-NamedNativeQuery-example[] +@NamedNativeQuery( + name = "find_person_name_and_nickName_dto", + query = + "select " + + " name, " + + " nickName " + + "from Person ", + resultSetMapping = "name_and_nickName_dto" +) +//end::sql-multiple-scalar-values-dto-NamedNativeQuery-example[] +//tag::sql-entity-NamedNativeQuery-example[] +@NamedNativeQuery( + name = "find_person_by_name", + query = + "select " + + " p.id AS \"id\", " + + " p.name AS \"name\", " + + " p.nickName AS \"nickName\", " + + " p.address AS \"address\", " + + " p.createdOn AS \"createdOn\", " + + " p.version AS \"version\" " + + "from Person p " + + "where p.name LIKE :name", + resultClass = Person.class +) +//end::sql-entity-NamedNativeQuery-example[] +//tag::sql-entity-associations-NamedNativeQuery-example[] +@NamedNativeQuery( + name = "find_person_with_phones_by_name", + query = + "select " + + " pr.id AS \"pr.id\", " + + " pr.name AS \"pr.name\", " + + " pr.nickName AS \"pr.nickName\", " + + " pr.address AS \"pr.address\", " + + " pr.createdOn AS \"pr.createdOn\", " + + " pr.version AS \"pr.version\", " + + " ph.id AS \"ph.id\", " + + " ph.person_id AS \"ph.person_id\", " + + " ph.phone_number AS \"ph.number\", " + + " ph.phone_type AS \"ph.type\" " + + "from Person pr " + + "join Phone ph ON pr.id = ph.person_id " + + "where pr.name LIKE :name", + resultSetMapping = "person_with_phones" +) +//end::sql-entity-associations-NamedNativeQuery-example[] +//tag::sql-entity-associations-NamedNativeQuery-example[] +@SqlResultSetMapping( + name = "person_with_phones", + entities = { + @EntityResult( + entityClass = Person.class, + fields = { + @FieldResult( name = "id", column = "pr.id" ), + @FieldResult( name = "name", column = "pr.name" ), + @FieldResult( name = "nickName", column = "pr.nickName" ), + @FieldResult( name = "address", column = "pr.address" ), + @FieldResult( name = "createdOn", column = "pr.createdOn" ), + @FieldResult( name = "version", column = "pr.version" ), + } + ), + @EntityResult( + entityClass = Phone.class, + fields = { + @FieldResult( name = "id", column = "ph.id" ), + @FieldResult( name = "person", column = "ph.person_id" ), + @FieldResult( name = "number", column = "ph.number" ), + @FieldResult( name = "type", column = "ph.type" ), + } + ) + } +) +//end::sql-entity-associations-NamedNativeQuery-example[] +//tag::sql-multiple-scalar-values-dto-NamedNativeQuery-example[] +@SqlResultSetMapping( + name = "name_and_nickName_dto", + classes = @ConstructorResult( + targetClass = PersonNames.class, + columns = { + @ColumnResult(name = "name"), + @ColumnResult(name = "nickName") + } + ) +) +//end::sql-multiple-scalar-values-dto-NamedNativeQuery-example[] +//tag::hql-examples-domain-model-example[] +//tag::jpql-api-named-query-example[] +@NamedQuery( + name = "get_person_by_name", + query = "select p from Person p where name = :name" +) +//end::jpql-api-named-query-example[] +// tag::jpa-read-only-entities-native-example[] +@NamedQuery( + name = "get_read_only_person_by_name", + query = "select p from Person p where name = :name", + hints = { + @QueryHint( + name = "org.hibernate.readOnly", + value = "true" + ) + } +) +//end::jpa-read-only-entities-native-example[] +@NamedQuery( + name = "delete_person", + query = "delete Person" +) +//tag::sql-sp-ref-cursor-oracle-named-query-example[] +@NamedStoredProcedureQuery( + name = "sp_person_phones", + procedureName = "sp_person_phones", + parameters = { + @StoredProcedureParameter( + name = "personId", + type = Long.class, + mode = ParameterMode.IN + ), + @StoredProcedureParameter( + name = "personPhones", + type = Class.class, + mode = ParameterMode.REF_CURSOR + ) + } +) +//end::sql-sp-ref-cursor-oracle-named-query-example[] +@Entity +public class Person { + + @Id + @GeneratedValue + private Long id; + + private String name; + + private String nickName; + + private String address; + + private LocalDateTime createdOn; + + @OneToMany(mappedBy = "person", cascade = CascadeType.ALL) + @OrderColumn(name = "order_id") + private List phones = new ArrayList<>(); + + @ElementCollection + @MapKeyEnumerated(EnumType.STRING) + private Map addresses = new HashMap<>(); + + @Version + private int version; + + //Getters and setters are omitted for brevity + +//end::hql-examples-domain-model-example[] + + public Person() {} + + public Person(String name) { + this.name = name; + } + + public Long getId() { + return id; + } + + public String getName() { + return name; + } + + public String getNickName() { + return nickName; + } + + public void setNickName(String nickName) { + this.nickName = nickName; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public LocalDateTime getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(LocalDateTime createdOn) { + this.createdOn = createdOn; + } + + public List getPhones() { + return phones; + } + + public Map getAddresses() { + return addresses; + } + + public void addPhone(Phone phone) { + phones.add( phone ); + phone.setPerson( this ); + } +//tag::hql-examples-domain-model-example[] +} +//end::hql-examples-domain-model-example[] diff --git a/documentation/src/main/java/org/hibernate/userguide/model/PersonNames.java b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/PersonNames.java similarity index 52% rename from documentation/src/main/java/org/hibernate/userguide/model/PersonNames.java rename to hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/PersonNames.java index 1053a770800e..7492035e204e 100644 --- a/documentation/src/main/java/org/hibernate/userguide/model/PersonNames.java +++ b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/PersonNames.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.model; +package org.hibernate.testing.orm.domain.userguide; /** * @author Vlad Mihalcea @@ -12,21 +12,21 @@ //tag::sql-ConstructorResult-dto-example[] public class PersonNames { - private final String name; + private final String name; - private final String nickName; + private final String nickName; - public PersonNames(String name, String nickName) { - this.name = name; - this.nickName = nickName; - } + public PersonNames(String name, String nickName) { + this.name = name; + this.nickName = nickName; + } - public String getName() { - return name; - } + public String getName() { + return name; + } - public String getNickName() { - return nickName; - } + public String getNickName() { + return nickName; + } } //end::sql-ConstructorResult-dto-example[] diff --git a/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/PersonPhoneCount.java b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/PersonPhoneCount.java new file mode 100644 index 000000000000..d278553ff1c2 --- /dev/null +++ b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/PersonPhoneCount.java @@ -0,0 +1,30 @@ +/* + * Hibernate, Relational Persistence for Idiomatic Java + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later. + * See the lgpl.txt file in the root directory or . + */ +package org.hibernate.testing.orm.domain.userguide; + +/** + * @author Vlad Mihalcea + */ +public class PersonPhoneCount { + + private final String name; + + private final Number phoneCount; + + public PersonPhoneCount(String name, Number phoneCount) { + this.name = name; + this.phoneCount = phoneCount; + } + + public String getName() { + return name; + } + + public Number getPhoneCount() { + return phoneCount; + } +} diff --git a/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/Phone.java b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/Phone.java new file mode 100644 index 000000000000..7d8fdd736803 --- /dev/null +++ b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/Phone.java @@ -0,0 +1,153 @@ +/* + * Hibernate, Relational Persistence for Idiomatic Java + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later. + * See the lgpl.txt file in the root directory or . + */ +package org.hibernate.testing.orm.domain.userguide; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.hibernate.annotations.NamedNativeQuery; +import org.hibernate.annotations.NamedQuery; + +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.ColumnResult; +import jakarta.persistence.ConstructorResult; +import jakarta.persistence.ElementCollection; +import jakarta.persistence.Entity; +import jakarta.persistence.EnumType; +import jakarta.persistence.Enumerated; +import jakarta.persistence.FetchType; +import jakarta.persistence.Id; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MapKey; +import jakarta.persistence.OneToMany; +import jakarta.persistence.SqlResultSetMapping; + +/** + * @author Vlad Mihalcea + */ +//tag::jpql-api-hibernate-named-query-example[] +@NamedQuery( + name = "get_phone_by_number", + query = "select p " + + "from Phone p " + + "where p.number = :number", + timeout = 1, + readOnly = true +) +//end::jpql-api-hibernate-named-query-example[] +//tag::sql-multiple-scalar-values-dto-NamedNativeQuery-hibernate-example[] +@NamedNativeQuery( + name = "get_person_phone_count", + query = "select pr.name AS name, count(*) AS phoneCount " + + "from Phone p " + + "join Person pr ON pr.id = p.person_id " + + "group BY pr.name", + resultSetMapping = "person_phone_count", + timeout = 1, + readOnly = true +) +@SqlResultSetMapping( + name = "person_phone_count", + classes = @ConstructorResult( + targetClass = PersonPhoneCount.class, + columns = { + @ColumnResult(name = "name"), + @ColumnResult(name = "phoneCount") + } + ) +) +//end::sql-multiple-scalar-values-dto-NamedNativeQuery-hibernate-example[] +//tag::hql-examples-domain-model-example[] +@Entity +public class Phone { + + @Id + private Long id; + + @ManyToOne(fetch = FetchType.LAZY) + private Person person; + + @Column(name = "phone_number") + private String number; + + @Enumerated(EnumType.STRING) + @Column(name = "phone_type") + private PhoneType type; + + @OneToMany(mappedBy = "phone", cascade = CascadeType.ALL, orphanRemoval = true) + private List calls = new ArrayList<>( ); + + //tag::hql-collection-qualification-example[] + @OneToMany(mappedBy = "phone") + @MapKey(name = "timestamp") + private Map callHistory = new HashMap<>(); + //end::hql-collection-qualification-example[] + + @ElementCollection + private List repairTimestamps = new ArrayList<>( ); + + //Getters and setters are omitted for brevity + + //end::hql-examples-domain-model-example[] + public Phone() {} + + public Phone(String number) { + this.number = number; + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getNumber() { + return number; + } + + public Person getPerson() { + return person; + } + + public void setPerson(Person person) { + this.person = person; + } + + public PhoneType getType() { + return type; + } + + public void setType(PhoneType type) { + this.type = type; + } + + public List getCalls() { + return calls; + } + + public Map getCallHistory() { + return callHistory; + } + + public List getRepairTimestamps() { + return repairTimestamps; + } + + public void addCall(Call call) { + calls.add( call ); + callHistory.put( call.getTimestamp(), call ); + call.setPhone( this ); + } +//tag::hql-examples-domain-model-example[] +} +//end::hql-examples-domain-model-example[] diff --git a/documentation/src/main/java/org/hibernate/userguide/model/PhoneType.java b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/PhoneType.java similarity index 83% rename from documentation/src/main/java/org/hibernate/userguide/model/PhoneType.java rename to hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/PhoneType.java index 3acbbe585cea..9a4a6cc437a1 100644 --- a/documentation/src/main/java/org/hibernate/userguide/model/PhoneType.java +++ b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/PhoneType.java @@ -4,14 +4,14 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.model; +package org.hibernate.testing.orm.domain.userguide; /** * @author Vlad Mihalcea */ //tag::hql-examples-domain-model-example[] public enum PhoneType { - LAND_LINE, - MOBILE; + LAND_LINE, + MOBILE; } //end::hql-examples-domain-model-example[] diff --git a/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/UserguideDomainModel.java b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/UserguideDomainModel.java new file mode 100644 index 000000000000..65bdb4a012dc --- /dev/null +++ b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/UserguideDomainModel.java @@ -0,0 +1,40 @@ +/* + * Hibernate, Relational Persistence for Idiomatic Java + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html + */ +package org.hibernate.testing.orm.domain.userguide; + +import org.hibernate.boot.MetadataSources; + +import org.hibernate.testing.orm.domain.AbstractDomainModelDescriptor; +import org.hibernate.testing.orm.domain.userguide.tooling.Customer; +import org.hibernate.testing.orm.domain.userguide.tooling.Item; +import org.hibernate.testing.orm.domain.userguide.tooling.Order; + +/** + * Model used mostly by tests referenced by the {@code documentation} project. + * + * @author Marco Belladelli + */ +public class UserguideDomainModel extends AbstractDomainModelDescriptor { + public static final UserguideDomainModel INSTANCE = new UserguideDomainModel(); + + public UserguideDomainModel() { + super( + Account.class, + Call.class, + CreditCardPayment.class, + Image.class, + Partner.class, + Payment.class, + Person.class, + Phone.class, + WireTransferPayment.class, + Customer.class, + Item.class, + Order.class + ); + } +} diff --git a/documentation/src/main/java/org/hibernate/userguide/model/WireTransferPayment.java b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/WireTransferPayment.java similarity index 89% rename from documentation/src/main/java/org/hibernate/userguide/model/WireTransferPayment.java rename to hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/WireTransferPayment.java index 8d99d0dfea59..22a5f9ece4a2 100644 --- a/documentation/src/main/java/org/hibernate/userguide/model/WireTransferPayment.java +++ b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/WireTransferPayment.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.userguide.model; +package org.hibernate.testing.orm.domain.userguide; import jakarta.persistence.Entity; diff --git a/documentation/src/main/java/org/hibernate/userguide/model/tooling/Customer.java b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/tooling/Customer.java similarity index 93% rename from documentation/src/main/java/org/hibernate/userguide/model/tooling/Customer.java rename to hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/tooling/Customer.java index 3b0025bb7d3a..5eccccf3fe91 100644 --- a/documentation/src/main/java/org/hibernate/userguide/model/tooling/Customer.java +++ b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/tooling/Customer.java @@ -4,12 +4,12 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.model.tooling; +package org.hibernate.testing.orm.domain.userguide.tooling; +import jakarta.persistence.Basic; import jakarta.persistence.Entity; -import jakarta.persistence.Table; import jakarta.persistence.Id; -import jakarta.persistence.Basic; +import jakarta.persistence.Table; /** * @author Steve Ebersole diff --git a/documentation/src/main/java/org/hibernate/userguide/model/tooling/Item.java b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/tooling/Item.java similarity index 93% rename from documentation/src/main/java/org/hibernate/userguide/model/tooling/Item.java rename to hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/tooling/Item.java index 9ba670c72e43..f01cf46f3efe 100644 --- a/documentation/src/main/java/org/hibernate/userguide/model/tooling/Item.java +++ b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/tooling/Item.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.model.tooling; +package org.hibernate.testing.orm.domain.userguide.tooling; import jakarta.persistence.Entity; import jakarta.persistence.Id; diff --git a/documentation/src/main/java/org/hibernate/userguide/model/tooling/Order.java b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/tooling/Order.java similarity index 94% rename from documentation/src/main/java/org/hibernate/userguide/model/tooling/Order.java rename to hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/tooling/Order.java index e54ec578da8f..b182218072c2 100644 --- a/documentation/src/main/java/org/hibernate/userguide/model/tooling/Order.java +++ b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/userguide/tooling/Order.java @@ -4,10 +4,11 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.userguide.model.tooling; +package org.hibernate.testing.orm.domain.userguide.tooling; import java.math.BigDecimal; import java.util.Set; + import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.ManyToOne;