diff --git a/persistence-modules/hibernate-annotations/.idea/$CACHE_FILE$ b/persistence-modules/hibernate-annotations/.idea/$CACHE_FILE$
deleted file mode 100644
index 0c8b793946..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/$CACHE_FILE$
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
-
-
-
-
- Android
-
-
- CorrectnessLintAndroid
-
-
- Java
-
-
- Java language level migration aidsJava
-
-
- LintAndroid
-
-
- PerformanceLintAndroid
-
-
-
-
- Android
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/.gitignore b/persistence-modules/hibernate-annotations/.idea/.gitignore
deleted file mode 100644
index 5c98b42884..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-# Default ignored files
-/workspace.xml
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/codeStyles/Project.xml b/persistence-modules/hibernate-annotations/.idea/codeStyles/Project.xml
deleted file mode 100644
index 6b4e7de90f..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/codeStyles/codeStyleConfig.xml b/persistence-modules/hibernate-annotations/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a179b..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/compiler.xml b/persistence-modules/hibernate-annotations/.idea/compiler.xml
deleted file mode 100644
index 2c3c2d00c3..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/compiler.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/encodings.xml b/persistence-modules/hibernate-annotations/.idea/encodings.xml
deleted file mode 100644
index aa00ffab78..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/encodings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__antlr_antlr_2_7_7.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__antlr_antlr_2_7_7.xml
deleted file mode 100644
index b8d93d8e01..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__antlr_antlr_2_7_7.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_1_7.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_1_7.xml
deleted file mode 100644
index cdd79598ea..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_1_7.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__ch_qos_logback_logback_core_1_1_7.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__ch_qos_logback_logback_core_1_1_7.xml
deleted file mode 100644
index 6c2a7607f1..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__ch_qos_logback_logback_core_1_1_7.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__com_experlog_xapool_1_5_0.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__com_experlog_xapool_1_5_0.xml
deleted file mode 100644
index ed3d184b0a..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__com_experlog_xapool_1_5_0.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__com_fasterxml_classmate_1_3_4.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__com_fasterxml_classmate_1_3_4.xml
deleted file mode 100644
index 33c30b4c89..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__com_fasterxml_classmate_1_3_4.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__com_h2database_h2_1_4_200.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__com_h2database_h2_1_4_200.xml
deleted file mode 100644
index 98dbdb5af7..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__com_h2database_h2_1_4_200.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__com_sun_istack_istack_commons_runtime_3_0_7.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__com_sun_istack_istack_commons_runtime_3_0_7.xml
deleted file mode 100644
index 4d7e82ee70..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__com_sun_istack_istack_commons_runtime_3_0_7.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__com_sun_xml_fastinfoset_FastInfoset_1_2_15.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__com_sun_xml_fastinfoset_FastInfoset_1_2_15.xml
deleted file mode 100644
index de27a39699..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__com_sun_xml_fastinfoset_FastInfoset_1_2_15.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__javax_activation_javax_activation_api_1_2_0.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__javax_activation_javax_activation_api_1_2_0.xml
deleted file mode 100644
index ff49512a0e..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__javax_activation_javax_activation_api_1_2_0.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__javax_persistence_javax_persistence_api_2_2.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__javax_persistence_javax_persistence_api_2_2.xml
deleted file mode 100644
index b7d39c62ba..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__javax_persistence_javax_persistence_api_2_2.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__javax_xml_bind_jaxb_api_2_3_1.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__javax_xml_bind_jaxb_api_2_3_1.xml
deleted file mode 100644
index 059f88ffa7..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__javax_xml_bind_jaxb_api_2_3_1.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__junit_junit_4_12.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__junit_junit_4_12.xml
deleted file mode 100644
index d411041745..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__junit_junit_4_12.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__log4j_log4j_1_2_17.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__log4j_log4j_1_2_17.xml
deleted file mode 100644
index e383c1bf1e..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__log4j_log4j_1_2_17.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_10_2.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_10_2.xml
deleted file mode 100644
index c01a21feee..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_10_2.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__net_bytebuddy_byte_buddy_agent_1_8_15.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__net_bytebuddy_byte_buddy_agent_1_8_15.xml
deleted file mode 100644
index a0c169abac..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__net_bytebuddy_byte_buddy_agent_1_8_15.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_apache_commons_commons_lang3_3_8_1.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_apache_commons_commons_lang3_3_8_1.xml
deleted file mode 100644
index 33b78e93d6..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_apache_commons_commons_lang3_3_8_1.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_apache_maven_surefire_surefire_logger_api_2_21_0.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_apache_maven_surefire_surefire_logger_api_2_21_0.xml
deleted file mode 100644
index 7ee7fe0883..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_apache_maven_surefire_surefire_logger_api_2_21_0.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_apiguardian_apiguardian_api_1_0_0.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_apiguardian_apiguardian_api_1_0_0.xml
deleted file mode 100644
index a82457d51f..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_apiguardian_apiguardian_api_1_0_0.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_dom4j_dom4j_2_1_1.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_dom4j_dom4j_2_1_1.xml
deleted file mode 100644
index 6c8b371c95..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_dom4j_dom4j_2_1_1.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_geolatte_geolatte_geom_1_4_0.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_geolatte_geolatte_geom_1_4_0.xml
deleted file mode 100644
index fd1928d428..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_geolatte_geolatte_geom_1_4_0.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_glassfish_jaxb_jaxb_runtime_2_3_1.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_glassfish_jaxb_jaxb_runtime_2_3_1.xml
deleted file mode 100644
index 0c7a80a835..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_glassfish_jaxb_jaxb_runtime_2_3_1.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_glassfish_jaxb_txw2_2_3_1.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_glassfish_jaxb_txw2_2_3_1.xml
deleted file mode 100644
index 638d9377ef..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_glassfish_jaxb_txw2_2_3_1.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_hamcrest_hamcrest_all_1_3.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_hamcrest_hamcrest_all_1_3.xml
deleted file mode 100644
index 56193163f3..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_hamcrest_hamcrest_all_1_3.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml
deleted file mode 100644
index f58bbc1127..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_hamcrest_hamcrest_library_1_3.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_hamcrest_hamcrest_library_1_3.xml
deleted file mode 100644
index 78dbe458d4..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_hamcrest_hamcrest_library_1_3.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_hibernate_common_hibernate_commons_annotations_5_1_0_Final.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_hibernate_common_hibernate_commons_annotations_5_1_0_Final.xml
deleted file mode 100644
index 1fd775b53b..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_hibernate_common_hibernate_commons_annotations_5_1_0_Final.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_hibernate_hibernate_core_5_4_7_Final.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_hibernate_hibernate_core_5_4_7_Final.xml
deleted file mode 100644
index c0032c5702..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_hibernate_hibernate_core_5_4_7_Final.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_hibernate_hibernate_spatial_5_4_7_Final.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_hibernate_hibernate_spatial_5_4_7_Final.xml
deleted file mode 100644
index 2ff4fb6567..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_hibernate_hibernate_spatial_5_4_7_Final.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_hibernate_hibernate_testing_5_4_7_Final.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_hibernate_hibernate_testing_5_4_7_Final.xml
deleted file mode 100644
index dc3c12b134..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_hibernate_hibernate_testing_5_4_7_Final.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_javassist_javassist_3_24_0_GA.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_javassist_javassist_3_24_0_GA.xml
deleted file mode 100644
index a9de551cc3..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_javassist_javassist_3_24_0_GA.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_jboss_byteman_byteman_4_0_8.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_jboss_byteman_byteman_4_0_8.xml
deleted file mode 100644
index 21b5f5b9a6..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_jboss_byteman_byteman_4_0_8.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_jboss_byteman_byteman_bmunit_4_0_8.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_jboss_byteman_byteman_bmunit_4_0_8.xml
deleted file mode 100644
index c481a97645..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_jboss_byteman_byteman_bmunit_4_0_8.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_jboss_byteman_byteman_install_4_0_8.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_jboss_byteman_byteman_install_4_0_8.xml
deleted file mode 100644
index dc501656cf..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_jboss_byteman_byteman_install_4_0_8.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_jboss_byteman_byteman_submit_4_0_8.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_jboss_byteman_byteman_submit_4_0_8.xml
deleted file mode 100644
index 5f5373122a..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_jboss_byteman_byteman_submit_4_0_8.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_jboss_jandex_2_0_5_Final.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_jboss_jandex_2_0_5_Final.xml
deleted file mode 100644
index 34e9ada6c7..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_jboss_jandex_2_0_5_Final.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_jboss_jbossts_jbossjta_4_16_4_Final.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_jboss_jbossts_jbossjta_4_16_4_Final.xml
deleted file mode 100644
index d1d90f6253..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_jboss_jbossts_jbossjta_4_16_4_Final.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_3_2_Final.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_3_2_Final.xml
deleted file mode 100644
index 5f7dd01e2b..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_3_2_Final.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_jboss_spec_javax_transaction_jboss_transaction_api_1_2_spec_1_1_1_Final.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_jboss_spec_javax_transaction_jboss_transaction_api_1_2_spec_1_1_1_Final.xml
deleted file mode 100644
index ec03510bec..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_jboss_spec_javax_transaction_jboss_transaction_api_1_2_spec_1_1_1_Final.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_api_5_2_0.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_api_5_2_0.xml
deleted file mode 100644
index 3c2d85c28b..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_api_5_2_0.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_engine_5_2_0.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_engine_5_2_0.xml
deleted file mode 100644
index 614200c2ad..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_engine_5_2_0.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_params_5_2_0.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_params_5_2_0.xml
deleted file mode 100644
index 7b363ded13..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_params_5_2_0.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_junit_platform_junit_platform_commons_1_2_0.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_junit_platform_junit_platform_commons_1_2_0.xml
deleted file mode 100644
index 92d6f7086d..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_junit_platform_junit_platform_commons_1_2_0.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_junit_platform_junit_platform_engine_1_2_0.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_junit_platform_junit_platform_engine_1_2_0.xml
deleted file mode 100644
index 5b2606a84a..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_junit_platform_junit_platform_engine_1_2_0.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_jvnet_staxex_stax_ex_1_8.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_jvnet_staxex_stax_ex_1_8.xml
deleted file mode 100644
index ee8e8ef36e..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_jvnet_staxex_stax_ex_1_8.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_locationtech_jts_jts_core_1_16_0.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_locationtech_jts_jts_core_1_16_0.xml
deleted file mode 100644
index 5654d1f37d..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_locationtech_jts_jts_core_1_16_0.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_mockito_mockito_core_2_21_0.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_mockito_mockito_core_2_21_0.xml
deleted file mode 100644
index f3bb7f6b81..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_mockito_mockito_core_2_21_0.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_objenesis_objenesis_2_6.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_objenesis_objenesis_2_6.xml
deleted file mode 100644
index af41e3b617..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_objenesis_objenesis_2_6.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_opentest4j_opentest4j_1_1_0.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_opentest4j_opentest4j_1_1_0.xml
deleted file mode 100644
index 79af13d934..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_opentest4j_opentest4j_1_1_0.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_postgresql_postgresql_42_2_2.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_postgresql_postgresql_42_2_2.xml
deleted file mode 100644
index 95fc49e407..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_postgresql_postgresql_42_2_2.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_slf4j_jcl_over_slf4j_1_7_21.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_slf4j_jcl_over_slf4j_1_7_21.xml
deleted file mode 100644
index 2f93a6301e..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_slf4j_jcl_over_slf4j_1_7_21.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_21.xml b/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_21.xml
deleted file mode 100644
index 1b644dd840..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_21.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/misc.xml b/persistence-modules/hibernate-annotations/.idea/misc.xml
deleted file mode 100644
index 4361200542..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/misc.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/.idea/vcs.xml b/persistence-modules/hibernate-annotations/.idea/vcs.xml
deleted file mode 100644
index b2bdec2d71..0000000000
--- a/persistence-modules/hibernate-annotations/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/README.md b/persistence-modules/hibernate-annotations/README.md
deleted file mode 100644
index 393cf82bfd..0000000000
--- a/persistence-modules/hibernate-annotations/README.md
+++ /dev/null
@@ -1,10 +0,0 @@
-## Hibernate Annotations
-
-This module contains articles about Annotations used in Hibernate.
-
-### Relevant Articles:
-- [Custom Types in Hibernate and the @Type Annotation](https://www.baeldung.com/hibernate-custom-types)
-- [@JoinColumn Annotation Explained](https://www.baeldung.com/jpa-join-column)
-- [Difference Between @JoinColumn and mappedBy](https://www.baeldung.com/jpa-joincolumn-vs-mappedby)
-- [Hibernate One to Many Annotation Tutorial](https://www.baeldung.com/hibernate-one-to-many)
-- [Hibernate @WhereJoinTable Annotation](https://www.baeldung.com/hibernate-wherejointable)
diff --git a/persistence-modules/hibernate-annotations/pom.xml b/persistence-modules/hibernate-annotations/pom.xml
deleted file mode 100644
index 0b47ee944a..0000000000
--- a/persistence-modules/hibernate-annotations/pom.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
- 4.0.0
- hibernate-annotations
- 0.1-SNAPSHOT
- hibernate-annotations
- jar
- Hibernate tutorial illustrating the use of named parameters
-
-
- com.ossez
- persistence-modules
- 1.0.0
-
-
-
-
- org.hibernate
- hibernate-core
- ${hibernate-core.version}
-
-
-
- com.h2database
- h2
- ${h2.version}
-
-
-
- org.apache.commons
- commons-lang3
- ${commons.lang3.version}
-
-
-
- org.hibernate
- hibernate-testing
- ${hibernate-core.version}
-
-
-
- org.hibernate
- hibernate-spatial
- ${hibernate-core.version}
-
-
-
-
-
- geodb-repo
- GeoDB repository
- http://repo.boundlessgeo.com/main/
-
-
-
-
- 5.4.24.Final
- 3.8.1
- true
- 2.1.7.RELEASE
- 5.4.7.Final
- 3.8.1
- 0.9
-
-
-
diff --git a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/HibernateUtil.java b/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/HibernateUtil.java
deleted file mode 100644
index afe2aeac89..0000000000
--- a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/HibernateUtil.java
+++ /dev/null
@@ -1,73 +0,0 @@
-package com.baeldung.hibernate;
-
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.net.URL;
-import java.util.Properties;
-
-import org.apache.commons.lang3.StringUtils;
-import org.hibernate.SessionFactory;
-import org.hibernate.boot.Metadata;
-import org.hibernate.boot.MetadataSources;
-import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
-import org.hibernate.service.ServiceRegistry;
-
-import com.baeldung.hibernate.joincolumn.Email;
-import com.baeldung.hibernate.joincolumn.Office;
-import com.baeldung.hibernate.joincolumn.OfficeAddress;
-
-public class HibernateUtil {
- private static String PROPERTY_FILE_NAME;
-
- public static SessionFactory getSessionFactory() throws IOException {
- return getSessionFactory(null);
- }
-
- public static SessionFactory getSessionFactory(String propertyFileName) throws IOException {
- PROPERTY_FILE_NAME = propertyFileName;
- ServiceRegistry serviceRegistry = configureServiceRegistry();
- return makeSessionFactory(serviceRegistry);
- }
-
- public static SessionFactory getSessionFactoryByProperties(Properties properties) throws IOException {
- ServiceRegistry serviceRegistry = configureServiceRegistry(properties);
- return makeSessionFactory(serviceRegistry);
- }
-
- private static SessionFactory makeSessionFactory(ServiceRegistry serviceRegistry) {
- MetadataSources metadataSources = new MetadataSources(serviceRegistry);
-
- metadataSources.addPackage("com.baeldung.hibernate.pojo");
- metadataSources.addAnnotatedClass(com.baeldung.hibernate.joincolumn.OfficialEmployee.class);
- metadataSources.addAnnotatedClass(Email.class);
- metadataSources.addAnnotatedClass(Office.class);
- metadataSources.addAnnotatedClass(OfficeAddress.class);
-
- Metadata metadata = metadataSources.getMetadataBuilder()
- .build();
-
- return metadata.getSessionFactoryBuilder()
- .build();
-
- }
-
- private static ServiceRegistry configureServiceRegistry() throws IOException {
- return configureServiceRegistry(getProperties());
- }
-
- private static ServiceRegistry configureServiceRegistry(Properties properties) throws IOException {
- return new StandardServiceRegistryBuilder().applySettings(properties)
- .build();
- }
-
- public static Properties getProperties() throws IOException {
- Properties properties = new Properties();
- URL propertiesURL = Thread.currentThread()
- .getContextClassLoader()
- .getResource(StringUtils.defaultString(PROPERTY_FILE_NAME, "hibernate.properties"));
- try (FileInputStream inputStream = new FileInputStream(propertiesURL.getFile())) {
- properties.load(inputStream);
- }
- return properties;
- }
-}
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/UnsupportedTenancyException.java b/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/UnsupportedTenancyException.java
deleted file mode 100644
index 99d9505ea3..0000000000
--- a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/UnsupportedTenancyException.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.baeldung.hibernate;
-
-public class UnsupportedTenancyException extends Exception {
- public UnsupportedTenancyException (String message) {
- super(message);
- }
-
-}
diff --git a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/customtypes/Address.java b/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/customtypes/Address.java
deleted file mode 100644
index d559e5a6c2..0000000000
--- a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/customtypes/Address.java
+++ /dev/null
@@ -1,69 +0,0 @@
-package com.baeldung.hibernate.customtypes;
-
-import java.util.Objects;
-
-public class Address {
-
- private String addressLine1;
- private String addressLine2;
- private String city;
- private String country;
- private int zipCode;
-
- public String getAddressLine1() {
- return addressLine1;
- }
-
- public String getAddressLine2() {
- return addressLine2;
- }
-
- public String getCity() {
- return city;
- }
-
- public String getCountry() {
- return country;
- }
-
- public int getZipCode() {
- return zipCode;
- }
-
- public void setAddressLine1(String addressLine1) {
- this.addressLine1 = addressLine1;
- }
-
- public void setAddressLine2(String addressLine2) {
- this.addressLine2 = addressLine2;
- }
-
- public void setCity(String city) {
- this.city = city;
- }
-
- public void setCountry(String country) {
- this.country = country;
- }
-
- public void setZipCode(int zipCode) {
- this.zipCode = zipCode;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- Address address = (Address) o;
- return zipCode == address.zipCode &&
- Objects.equals(addressLine1, address.addressLine1) &&
- Objects.equals(addressLine2, address.addressLine2) &&
- Objects.equals(city, address.city) &&
- Objects.equals(country, address.country);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(addressLine1, addressLine2, city, country, zipCode);
- }
-}
diff --git a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/customtypes/AddressType.java b/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/customtypes/AddressType.java
deleted file mode 100644
index c10c67df9a..0000000000
--- a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/customtypes/AddressType.java
+++ /dev/null
@@ -1,169 +0,0 @@
-package com.baeldung.hibernate.customtypes;
-
-import org.hibernate.HibernateException;
-import org.hibernate.engine.spi.SharedSessionContractImplementor;
-import org.hibernate.type.IntegerType;
-import org.hibernate.type.StringType;
-import org.hibernate.type.Type;
-import org.hibernate.usertype.CompositeUserType;
-
-import java.io.Serializable;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Types;
-import java.util.Objects;
-
-public class AddressType implements CompositeUserType {
-
- @Override
- public String[] getPropertyNames() {
- return new String[]{"addressLine1", "addressLine2",
- "city", "country", "zipcode"};
- }
-
- @Override
- public Type[] getPropertyTypes() {
- return new Type[]{StringType.INSTANCE, StringType.INSTANCE,
- StringType.INSTANCE, StringType.INSTANCE, IntegerType.INSTANCE};
- }
-
- @Override
- public Object getPropertyValue(Object component, int property) throws HibernateException {
-
- Address empAdd = (Address) component;
-
- switch (property) {
- case 0:
- return empAdd.getAddressLine1();
- case 1:
- return empAdd.getAddressLine2();
- case 2:
- return empAdd.getCity();
- case 3:
- return empAdd.getCountry();
- case 4:
- return Integer.valueOf(empAdd.getZipCode());
- }
-
- throw new IllegalArgumentException(property +
- " is an invalid property index for class type " +
- component.getClass().getName());
- }
-
- @Override
- public void setPropertyValue(Object component, int property, Object value) throws HibernateException {
-
- Address empAdd = (Address) component;
-
- switch (property) {
- case 0:
- empAdd.setAddressLine1((String) value);
- case 1:
- empAdd.setAddressLine2((String) value);
- case 2:
- empAdd.setCity((String) value);
- case 3:
- empAdd.setCountry((String) value);
- case 4:
- empAdd.setZipCode((Integer) value);
- }
-
- throw new IllegalArgumentException(property +
- " is an invalid property index for class type " +
- component.getClass().getName());
-
- }
-
- @Override
- public Class returnedClass() {
- return Address.class;
- }
-
- @Override
- public boolean equals(Object x, Object y) throws HibernateException {
- if (x == y)
- return true;
-
- if (Objects.isNull(x) || Objects.isNull(y))
- return false;
-
- return x.equals(y);
- }
-
- @Override
- public int hashCode(Object x) throws HibernateException {
- return x.hashCode();
- }
-
- @Override
- public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException {
-
- Address empAdd = new Address();
- empAdd.setAddressLine1(rs.getString(names[0]));
-
- if (rs.wasNull())
- return null;
-
- empAdd.setAddressLine2(rs.getString(names[1]));
- empAdd.setCity(rs.getString(names[2]));
- empAdd.setCountry(rs.getString(names[3]));
- empAdd.setZipCode(rs.getInt(names[4]));
-
- return empAdd;
- }
-
- @Override
- public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException {
-
- if (Objects.isNull(value))
- st.setNull(index, Types.VARCHAR);
- else {
-
- Address empAdd = (Address) value;
- st.setString(index, empAdd.getAddressLine1());
- st.setString(index + 1, empAdd.getAddressLine2());
- st.setString(index + 2, empAdd.getCity());
- st.setString(index + 3, empAdd.getCountry());
- st.setInt(index + 4, empAdd.getZipCode());
- }
- }
-
- @Override
- public Object deepCopy(Object value) throws HibernateException {
-
- if (Objects.isNull(value))
- return null;
-
- Address oldEmpAdd = (Address) value;
- Address newEmpAdd = new Address();
-
- newEmpAdd.setAddressLine1(oldEmpAdd.getAddressLine1());
- newEmpAdd.setAddressLine2(oldEmpAdd.getAddressLine2());
- newEmpAdd.setCity(oldEmpAdd.getCity());
- newEmpAdd.setCountry(oldEmpAdd.getCountry());
- newEmpAdd.setZipCode(oldEmpAdd.getZipCode());
-
- return newEmpAdd;
- }
-
- @Override
- public boolean isMutable() {
- return true;
- }
-
- @Override
- public Serializable disassemble(Object value, SharedSessionContractImplementor session) throws HibernateException {
- return (Serializable) deepCopy(value);
- }
-
- @Override
- public Object assemble(Serializable cached, SharedSessionContractImplementor session, Object owner) throws HibernateException {
- return deepCopy(cached);
- }
-
- @Override
- public Object replace(Object original, Object target, SharedSessionContractImplementor session, Object owner) throws HibernateException {
- return original;
- }
-}
diff --git a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/customtypes/LocalDateStringJavaDescriptor.java b/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/customtypes/LocalDateStringJavaDescriptor.java
deleted file mode 100644
index 56be9e693f..0000000000
--- a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/customtypes/LocalDateStringJavaDescriptor.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package com.baeldung.hibernate.customtypes;
-
-import org.hibernate.type.LocalDateType;
-import org.hibernate.type.descriptor.WrapperOptions;
-import org.hibernate.type.descriptor.java.AbstractTypeDescriptor;
-import org.hibernate.type.descriptor.java.ImmutableMutabilityPlan;
-import org.hibernate.type.descriptor.java.MutabilityPlan;
-
-import java.time.LocalDate;
-
-public class LocalDateStringJavaDescriptor extends AbstractTypeDescriptor {
-
- public static final LocalDateStringJavaDescriptor INSTANCE = new LocalDateStringJavaDescriptor();
-
- public LocalDateStringJavaDescriptor() {
- super(LocalDate.class, ImmutableMutabilityPlan.INSTANCE);
- }
-
- @Override
- public String toString(LocalDate value) {
- return LocalDateType.FORMATTER.format(value);
- }
-
- @Override
- public LocalDate fromString(String string) {
- return LocalDate.from(LocalDateType.FORMATTER.parse(string));
- }
-
- @Override
- public X unwrap(LocalDate value, Class type, WrapperOptions options) {
-
- if (value == null)
- return null;
-
- if (String.class.isAssignableFrom(type))
- return (X) LocalDateType.FORMATTER.format(value);
-
- throw unknownUnwrap(type);
- }
-
- @Override
- public LocalDate wrap(X value, WrapperOptions options) {
- if (value == null)
- return null;
-
- if(String.class.isInstance(value))
- return LocalDate.from(LocalDateType.FORMATTER.parse((CharSequence) value));
-
- throw unknownWrap(value.getClass());
- }
-}
diff --git a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/customtypes/LocalDateStringType.java b/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/customtypes/LocalDateStringType.java
deleted file mode 100644
index c8d37073e8..0000000000
--- a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/customtypes/LocalDateStringType.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package com.baeldung.hibernate.customtypes;
-
-import org.hibernate.dialect.Dialect;
-import org.hibernate.type.AbstractSingleColumnStandardBasicType;
-import org.hibernate.type.DiscriminatorType;
-import org.hibernate.type.descriptor.java.LocalDateJavaDescriptor;
-import org.hibernate.type.descriptor.sql.VarcharTypeDescriptor;
-
-import java.time.LocalDate;
-
-public class LocalDateStringType extends AbstractSingleColumnStandardBasicType implements DiscriminatorType {
-
- public static final LocalDateStringType INSTANCE = new LocalDateStringType();
-
- public LocalDateStringType() {
- super(VarcharTypeDescriptor.INSTANCE, LocalDateStringJavaDescriptor.INSTANCE);
- }
-
- @Override
- public String getName() {
- return "LocalDateString";
- }
-
- @Override
- public LocalDate stringToObject(String xml) throws Exception {
- return fromString(xml);
- }
-
- @Override
- public String objectToSQLString(LocalDate value, Dialect dialect) throws Exception {
- return '\'' + toString(value) + '\'';
- }
-
-}
diff --git a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/customtypes/OfficeEmployee.java b/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/customtypes/OfficeEmployee.java
deleted file mode 100644
index 3ca06e4316..0000000000
--- a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/customtypes/OfficeEmployee.java
+++ /dev/null
@@ -1,88 +0,0 @@
-package com.baeldung.hibernate.customtypes;
-
-import com.baeldung.hibernate.pojo.Phone;
-import org.hibernate.annotations.Columns;
-import org.hibernate.annotations.Parameter;
-import org.hibernate.annotations.Type;
-import org.hibernate.annotations.TypeDef;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.Table;
-import java.time.LocalDate;
-
-@TypeDef(name = "PhoneNumber",
- typeClass = PhoneNumberType.class,
- defaultForType = PhoneNumber.class)
-@Entity
-@Table(name = "OfficeEmployee")
-public class OfficeEmployee {
-
- @Id
- @GeneratedValue
- private long id;
-
- @Column
- @Type(type = "LocalDateString")
- private LocalDate dateOfJoining;
-
- @Columns(columns = {@Column(name = "country_code"),
- @Column(name = "city_code"),
- @Column(name = "number")})
- private PhoneNumber employeeNumber;
-
- @Columns(columns = {@Column(name = "address_line_1"),
- @Column(name = "address_line_2"),
- @Column(name = "city"), @Column(name = "country"),
- @Column(name = "zip_code")})
- @Type(type = "com.baeldung.hibernate.customtypes.AddressType")
- private Address empAddress;
-
- @Type(type = "com.baeldung.hibernate.customtypes.SalaryType",
- parameters = {@Parameter(name = "currency", value = "USD")})
- @Columns(columns = {@Column(name = "amount"),
- @Column(name = "currency")})
- private Salary salary;
-
- public Salary getSalary() {
- return salary;
- }
-
- public void setSalary(Salary salary) {
- this.salary = salary;
- }
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- public LocalDate getDateOfJoining() {
- return dateOfJoining;
- }
-
- public void setDateOfJoining(LocalDate dateOfJoining) {
- this.dateOfJoining = dateOfJoining;
- }
-
- public PhoneNumber getEmployeeNumber() {
- return employeeNumber;
- }
-
- public void setEmployeeNumber(PhoneNumber employeeNumber) {
- this.employeeNumber = employeeNumber;
- }
-
- public Address getEmpAddress() {
- return empAddress;
- }
-
- public void setEmpAddress(Address empAddress) {
- this.empAddress = empAddress;
- }
-}
diff --git a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/customtypes/PhoneNumber.java b/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/customtypes/PhoneNumber.java
deleted file mode 100644
index 0be6cbc910..0000000000
--- a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/customtypes/PhoneNumber.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package com.baeldung.hibernate.customtypes;
-
-import java.util.Objects;
-
-public final class PhoneNumber {
-
- private final int countryCode;
- private final int cityCode;
- private final int number;
-
- public PhoneNumber(int countryCode, int cityCode, int number) {
- this.countryCode = countryCode;
- this.cityCode = cityCode;
- this.number = number;
- }
-
- public int getCountryCode() {
- return countryCode;
- }
-
- public int getCityCode() {
- return cityCode;
- }
-
- public int getNumber() {
- return number;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- PhoneNumber that = (PhoneNumber) o;
- return countryCode == that.countryCode &&
- cityCode == that.cityCode &&
- number == that.number;
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(countryCode, cityCode, number);
- }
-}
diff --git a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/customtypes/PhoneNumberType.java b/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/customtypes/PhoneNumberType.java
deleted file mode 100644
index 9f09352bec..0000000000
--- a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/customtypes/PhoneNumberType.java
+++ /dev/null
@@ -1,98 +0,0 @@
-package com.baeldung.hibernate.customtypes;
-
-import org.hibernate.HibernateException;
-import org.hibernate.engine.spi.SharedSessionContractImplementor;
-import org.hibernate.usertype.UserType;
-
-import java.io.Serializable;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Types;
-import java.util.Objects;
-
-
-public class PhoneNumberType implements UserType {
- @Override
- public int[] sqlTypes() {
- return new int[]{Types.INTEGER, Types.INTEGER, Types.INTEGER};
- }
-
- @Override
- public Class returnedClass() {
- return PhoneNumber.class;
- }
-
- @Override
- public boolean equals(Object x, Object y) throws HibernateException {
- if (x == y)
- return true;
- if (Objects.isNull(x) || Objects.isNull(y))
- return false;
-
- return x.equals(y);
- }
-
- @Override
- public int hashCode(Object x) throws HibernateException {
- return x.hashCode();
- }
-
- @Override
- public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException {
- int countryCode = rs.getInt(names[0]);
-
- if (rs.wasNull())
- return null;
-
- int cityCode = rs.getInt(names[1]);
- int number = rs.getInt(names[2]);
- PhoneNumber employeeNumber = new PhoneNumber(countryCode, cityCode, number);
-
- return employeeNumber;
- }
-
- @Override
- public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException {
-
- if (Objects.isNull(value)) {
- st.setNull(index, Types.INTEGER);
- } else {
- PhoneNumber employeeNumber = (PhoneNumber) value;
- st.setInt(index,employeeNumber.getCountryCode());
- st.setInt(index+1,employeeNumber.getCityCode());
- st.setInt(index+2,employeeNumber.getNumber());
- }
- }
-
- @Override
- public Object deepCopy(Object value) throws HibernateException {
- if (Objects.isNull(value))
- return null;
-
- PhoneNumber empNumber = (PhoneNumber) value;
- PhoneNumber newEmpNumber = new PhoneNumber(empNumber.getCountryCode(),empNumber.getCityCode(),empNumber.getNumber());
-
- return newEmpNumber;
- }
-
- @Override
- public boolean isMutable() {
- return false;
- }
-
- @Override
- public Serializable disassemble(Object value) throws HibernateException {
- return (Serializable) value;
- }
-
- @Override
- public Object assemble(Serializable cached, Object owner) throws HibernateException {
- return cached;
- }
-
- @Override
- public Object replace(Object original, Object target, Object owner) throws HibernateException {
- return original;
- }
-}
diff --git a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/customtypes/Salary.java b/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/customtypes/Salary.java
deleted file mode 100644
index f9a7ac5902..0000000000
--- a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/customtypes/Salary.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.baeldung.hibernate.customtypes;
-
-import java.util.Objects;
-
-public class Salary {
-
- private Long amount;
- private String currency;
-
- public Long getAmount() {
- return amount;
- }
-
- public void setAmount(Long amount) {
- this.amount = amount;
- }
-
- public String getCurrency() {
- return currency;
- }
-
- public void setCurrency(String currency) {
- this.currency = currency;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- Salary salary = (Salary) o;
- return Objects.equals(amount, salary.amount) &&
- Objects.equals(currency, salary.currency);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(amount, currency);
- }
-}
diff --git a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/customtypes/SalaryCurrencyConvertor.java b/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/customtypes/SalaryCurrencyConvertor.java
deleted file mode 100644
index 340c697c11..0000000000
--- a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/customtypes/SalaryCurrencyConvertor.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.baeldung.hibernate.customtypes;
-
-public class SalaryCurrencyConvertor {
-
- public static Long convert(Long amount, String oldCurr, String newCurr){
- if (newCurr.equalsIgnoreCase(oldCurr))
- return amount;
-
- return convertTo();
- }
-
- private static Long convertTo() {
- return 10L;
- }
-}
diff --git a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/customtypes/SalaryType.java b/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/customtypes/SalaryType.java
deleted file mode 100644
index 266b85140b..0000000000
--- a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/customtypes/SalaryType.java
+++ /dev/null
@@ -1,161 +0,0 @@
-package com.baeldung.hibernate.customtypes;
-
-import org.hibernate.HibernateException;
-import org.hibernate.engine.spi.SharedSessionContractImplementor;
-import org.hibernate.type.LongType;
-import org.hibernate.type.StringType;
-import org.hibernate.type.Type;
-import org.hibernate.usertype.CompositeUserType;
-import org.hibernate.usertype.DynamicParameterizedType;
-
-import java.io.Serializable;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Types;
-import java.util.Objects;
-import java.util.Properties;
-
-public class SalaryType implements CompositeUserType, DynamicParameterizedType {
-
- private String localCurrency;
-
- @Override
- public String[] getPropertyNames() {
- return new String[]{"amount", "currency"};
- }
-
- @Override
- public Type[] getPropertyTypes() {
- return new Type[]{LongType.INSTANCE, StringType.INSTANCE};
- }
-
- @Override
- public Object getPropertyValue(Object component, int property) throws HibernateException {
-
- Salary salary = (Salary) component;
-
- switch (property) {
- case 0:
- return salary.getAmount();
- case 1:
- return salary.getCurrency();
- }
-
- throw new IllegalArgumentException(property +
- " is an invalid property index for class type " +
- component.getClass().getName());
-
- }
-
-
- @Override
- public void setPropertyValue(Object component, int property, Object value) throws HibernateException {
-
- Salary salary = (Salary) component;
-
- switch (property) {
- case 0:
- salary.setAmount((Long) value);
- case 1:
- salary.setCurrency((String) value);
- }
-
- throw new IllegalArgumentException(property +
- " is an invalid property index for class type " +
- component.getClass().getName());
-
- }
-
- @Override
- public Class returnedClass() {
- return Salary.class;
- }
-
- @Override
- public boolean equals(Object x, Object y) throws HibernateException {
-
- if (x == y)
- return true;
-
- if (Objects.isNull(x) || Objects.isNull(y))
- return false;
-
- return x.equals(y);
-
- }
-
- @Override
- public int hashCode(Object x) throws HibernateException {
- return x.hashCode();
- }
-
- @Override
- public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException {
-
- Salary salary = new Salary();
- salary.setAmount(rs.getLong(names[0]));
-
- if (rs.wasNull())
- return null;
-
- salary.setCurrency(rs.getString(names[1]));
-
- return salary;
- }
-
- @Override
- public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException {
-
-
- if (Objects.isNull(value))
- st.setNull(index, Types.BIGINT);
- else {
-
- Salary salary = (Salary) value;
- st.setLong(index, SalaryCurrencyConvertor.convert(salary.getAmount(),
- salary.getCurrency(), localCurrency));
- st.setString(index + 1, salary.getCurrency());
- }
- }
-
- @Override
- public Object deepCopy(Object value) throws HibernateException {
-
- if (Objects.isNull(value))
- return null;
-
- Salary oldSal = (Salary) value;
- Salary newSal = new Salary();
-
- newSal.setAmount(oldSal.getAmount());
- newSal.setCurrency(oldSal.getCurrency());
-
- return newSal;
- }
-
- @Override
- public boolean isMutable() {
- return true;
- }
-
- @Override
- public Serializable disassemble(Object value, SharedSessionContractImplementor session) throws HibernateException {
- return (Serializable) deepCopy(value);
- }
-
- @Override
- public Object assemble(Serializable cached, SharedSessionContractImplementor session, Object owner) throws HibernateException {
- return deepCopy(cached);
- }
-
- @Override
- public Object replace(Object original, Object target, SharedSessionContractImplementor session, Object owner) throws HibernateException {
- return original;
- }
-
- @Override
- public void setParameterValues(Properties parameters) {
- this.localCurrency = parameters.getProperty("currency");
- }
-}
diff --git a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/joincolumn/Email.java b/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/joincolumn/Email.java
deleted file mode 100644
index df07c3cf69..0000000000
--- a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/joincolumn/Email.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package com.baeldung.hibernate.joincolumn;
-
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-
-@Entity
-public class Email {
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- private Long id;
-
- private String address;
-
- @ManyToOne(fetch = FetchType.LAZY)
- @JoinColumn(name = "employee_id")
- private OfficialEmployee employee;
-
- public Long getId() {
- return id;
- }
-
- public void setId(Long id) {
- this.id = id;
- }
-
- public String getAddress() {
- return address;
- }
-
- public void setAddress(String address) {
- this.address = address;
- }
-
- public OfficialEmployee getEmployee() {
- return employee;
- }
-
- public void setEmployee(OfficialEmployee employee) {
- this.employee = employee;
- }
-}
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/joincolumn/Office.java b/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/joincolumn/Office.java
deleted file mode 100644
index 9940577761..0000000000
--- a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/joincolumn/Office.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.baeldung.hibernate.joincolumn;
-
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.JoinColumns;
-import javax.persistence.ManyToOne;
-
-@Entity
-public class Office {
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- private Long id;
-
- @ManyToOne(fetch = FetchType.LAZY)
- @JoinColumns({
- @JoinColumn(name="ADDR_ID", referencedColumnName="ID"),
- @JoinColumn(name="ADDR_ZIP", referencedColumnName="ZIP")
- })
- private OfficeAddress address;
-
- public Long getId() {
- return id;
- }
-
- public void setId(Long id) {
- this.id = id;
- }
-
- public OfficeAddress getAddress() {
- return address;
- }
-
- public void setAddress(OfficeAddress address) {
- this.address = address;
- }
-}
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/joincolumn/OfficeAddress.java b/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/joincolumn/OfficeAddress.java
deleted file mode 100644
index cc723db6a2..0000000000
--- a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/joincolumn/OfficeAddress.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package com.baeldung.hibernate.joincolumn;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-
-@Entity
-public class OfficeAddress {
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- private Long id;
-
- @Column(name = "ZIP")
- private String zipCode;
-
- public Long getId() {
- return id;
- }
-
- public void setId(Long id) {
- this.id = id;
- }
-
- public String getZipCode() {
- return zipCode;
- }
-
- public void setZipCode(String zipCode) {
- this.zipCode = zipCode;
- }
-}
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/joincolumn/OfficialEmployee.java b/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/joincolumn/OfficialEmployee.java
deleted file mode 100644
index 49c63c7578..0000000000
--- a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/joincolumn/OfficialEmployee.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package com.baeldung.hibernate.joincolumn;
-
-import java.util.List;
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.OneToMany;
-
-@Entity
-public class OfficialEmployee {
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- private Long id;
-
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "employee")
- private List emails;
-
- public Long getId() {
- return id;
- }
-
- public void setId(Long id) {
- this.id = id;
- }
-
- public List getEmails() {
- return emails;
- }
-
- public void setEmails(List emails) {
- this.emails = emails;
- }
-}
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/oneToMany/config/HibernateAnnotationUtil.java b/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/oneToMany/config/HibernateAnnotationUtil.java
deleted file mode 100644
index 46e6824f42..0000000000
--- a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/oneToMany/config/HibernateAnnotationUtil.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package com.baeldung.hibernate.oneToMany.config;
-
-import org.hibernate.SessionFactory;
-import org.hibernate.boot.Metadata;
-import org.hibernate.boot.MetadataSources;
-import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
-import org.hibernate.service.ServiceRegistry;
-
-public class HibernateAnnotationUtil {
-
- private static SessionFactory sessionFactory;
-
- private static SessionFactory buildSessionFactory() {
- try {
- // Create the SessionFactory from hibernate-annotation.cfg.xml
- ServiceRegistry serviceRegistry = new StandardServiceRegistryBuilder().configure("hibernate-annotation.cfg.xml").build();
- Metadata metadata = new MetadataSources(serviceRegistry).getMetadataBuilder().build();
- SessionFactory sessionFactory = metadata.getSessionFactoryBuilder().build();
-
- return sessionFactory;
-
- } catch (Throwable ex) {
- System.err.println("Initial SessionFactory creation failed." + ex);
- ex.printStackTrace();
- throw new ExceptionInInitializerError(ex);
- }
- }
-
- public static SessionFactory getSessionFactory() {
- if (sessionFactory == null)
- sessionFactory = buildSessionFactory();
- return sessionFactory;
- }
-}
diff --git a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/oneToMany/main/HibernateManyisOwningSide.java b/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/oneToMany/main/HibernateManyisOwningSide.java
deleted file mode 100644
index 372fb2fc07..0000000000
--- a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/oneToMany/main/HibernateManyisOwningSide.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package com.baeldung.hibernate.oneToMany.main;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.hibernate.Session;
-import org.hibernate.SessionFactory;
-import org.hibernate.Transaction;
-
-import com.baeldung.hibernate.oneToMany.config.HibernateAnnotationUtil;
-import com.baeldung.hibernate.oneToMany.model.Cart;
-import com.baeldung.hibernate.oneToMany.model.Items;
-import com.baeldung.hibernate.oneToMany.model.ItemsOIO;
-
-public class HibernateManyisOwningSide {
- public static void main(String[] args) {
-
- Cart cart = new Cart();
- Cart cart2 = new Cart();
-
- Items item1 = new Items(cart);
- Items item2 = new Items(cart2);
- Set itemsSet = new HashSet();
- itemsSet.add(item1);
- itemsSet.add(item2);
-
- cart.setItems(itemsSet);
-
-
-
- SessionFactory sessionFactory = null;
- Session session = null;
- Transaction tx = null;
- try {
- // Get Session
- sessionFactory = HibernateAnnotationUtil.getSessionFactory();
- session = sessionFactory.getCurrentSession();
- System.out.println("Session created");
- // start transaction
- tx = session.beginTransaction();
- // Save the Model object
- session.save(cart);
- session.save(cart2);
- session.save(item1);
- session.save(item2);
- // Commit transaction
- tx.commit();
- session = sessionFactory.getCurrentSession();
- tx = session.beginTransaction();
-
- item1 = (Items) session.get(Items.class, new Long(1));
- item2 = (Items) session.get(Items.class, new Long(2));
- tx.commit();
-
-
- System.out.println("item1 ID=" + item1.getId() + ", Foreign Key CartOIO ID=" + item1.getCart()
- .getId());
- System.out.println("item2 ID=" + item2.getId() + ", Foreign Key CartOIO ID=" + item2.getCart()
- .getId());
-
- } catch (Exception e) {
- System.out.println("Exception occured. " + e.getMessage());
- e.printStackTrace();
- } finally {
- if (!sessionFactory.isClosed()) {
- System.out.println("Closing SessionFactory");
- sessionFactory.close();
- }
- }
- }
-}
diff --git a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/oneToMany/main/HibernateOneToManyAnnotationMain.java b/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/oneToMany/main/HibernateOneToManyAnnotationMain.java
deleted file mode 100644
index 2bc5e514f7..0000000000
--- a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/oneToMany/main/HibernateOneToManyAnnotationMain.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package com.baeldung.hibernate.oneToMany.main;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.hibernate.Session;
-import org.hibernate.SessionFactory;
-import org.hibernate.Transaction;
-
-import com.baeldung.hibernate.oneToMany.config.HibernateAnnotationUtil;
-import com.baeldung.hibernate.oneToMany.model.Cart;
-import com.baeldung.hibernate.oneToMany.model.Items;
-
-public class HibernateOneToManyAnnotationMain {
-
- public static void main(String[] args) {
-
- Cart cart = new Cart();
-
- Items item1 = new Items(cart);
- Items item2 = new Items(cart);
- Set itemsSet = new HashSet();
- itemsSet.add(item1);
- itemsSet.add(item2);
-
- cart.setItems(itemsSet);
-
-
- SessionFactory sessionFactory = null;
- Session session = null;
- Transaction tx = null;
- try {
- // Get Session
- sessionFactory = HibernateAnnotationUtil.getSessionFactory();
- session = sessionFactory.getCurrentSession();
- System.out.println("Session created");
- // start transaction
- tx = session.beginTransaction();
- // Save the Model object
- session.save(cart);
- session.save(item1);
- session.save(item2);
- // Commit transaction
- tx.commit();
- System.out.println("Cart ID=" + cart.getId());
- System.out.println("item1 ID=" + item1.getId() + ", Foreign Key Cart ID=" + item1.getCart().getId());
- System.out.println("item2 ID=" + item2.getId() + ", Foreign Key Cart ID=" + item1.getCart().getId());
-
- } catch (Exception e) {
- System.out.println("Exception occured. " + e.getMessage());
- e.printStackTrace();
- } finally {
- if (!sessionFactory.isClosed()) {
- System.out.println("Closing SessionFactory");
- sessionFactory.close();
- }
- }
- }
-
-}
diff --git a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/oneToMany/main/HibernateOneisOwningSide.java b/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/oneToMany/main/HibernateOneisOwningSide.java
deleted file mode 100644
index 0777664dd0..0000000000
--- a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/oneToMany/main/HibernateOneisOwningSide.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package com.baeldung.hibernate.oneToMany.main;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.hibernate.Session;
-import org.hibernate.SessionFactory;
-import org.hibernate.Transaction;
-
-import com.baeldung.hibernate.oneToMany.config.HibernateAnnotationUtil;
-import com.baeldung.hibernate.oneToMany.model.CartOIO;
-import com.baeldung.hibernate.oneToMany.model.ItemsOIO;
-
-public class HibernateOneisOwningSide {
- public static void main(String[] args) {
-
- CartOIO cart = new CartOIO();
- CartOIO cart2 = new CartOIO();
-
- ItemsOIO item1 = new ItemsOIO(cart);
- ItemsOIO item2 = new ItemsOIO(cart2);
- Set itemsSet = new HashSet();
- itemsSet.add(item1);
- itemsSet.add(item2);
-
- cart.setItems(itemsSet);
-
- SessionFactory sessionFactory = null;
- Session session = null;
- Transaction tx = null;
- try {
- // Get Session
- sessionFactory = HibernateAnnotationUtil.getSessionFactory();
- session = sessionFactory.getCurrentSession();
- System.out.println("Session created");
- // start transaction
- tx = session.beginTransaction();
- // Save the Model object
- session.save(cart);
- session.save(cart2);
- session.save(item1);
- session.save(item2);
- // Commit transaction
- tx.commit();
-
- session = sessionFactory.getCurrentSession();
- tx = session.beginTransaction();
- item1 = (ItemsOIO) session.get(ItemsOIO.class, new Long(1));
- item2 = (ItemsOIO) session.get(ItemsOIO.class, new Long(2));
- tx.commit();
-
- System.out.println("item1 ID=" + item1.getId() + ", Foreign Key CartOIO ID=" + item1.getCartOIO()
- .getId());
- System.out.println("item2 ID=" + item2.getId() + ", Foreign Key CartOIO ID=" + item2.getCartOIO()
- .getId());
-
- } catch (Exception e) {
- System.out.println("Exception occured. " + e.getMessage());
- e.printStackTrace();
- } finally {
- if (!sessionFactory.isClosed()) {
- System.out.println("Closing SessionFactory");
- sessionFactory.close();
- }
- }
- }
-}
diff --git a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/oneToMany/model/Cart.java b/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/oneToMany/model/Cart.java
deleted file mode 100644
index b8b991831e..0000000000
--- a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/oneToMany/model/Cart.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package com.baeldung.hibernate.oneToMany.model;
-
-import java.util.Set;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.OneToMany;
-import javax.persistence.Table;
-
-@Entity
-@Table(name = "CART")
-public class Cart {
-
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- @Column(name = "cart_id")
- private long id;
-
-
- @OneToMany(mappedBy = "cart")
- private Set items;
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
-
- public Set getItems() {
- return items;
- }
-
- public void setItems(Set items) {
- this.items = items;
- }
-
-}
diff --git a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/oneToMany/model/CartOIO.java b/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/oneToMany/model/CartOIO.java
deleted file mode 100644
index 8a5ed5e7a4..0000000000
--- a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/oneToMany/model/CartOIO.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package com.baeldung.hibernate.oneToMany.model;
-
-import java.util.Set;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.OneToMany;
-import javax.persistence.Table;
-
-
-
-@Entity
-@Table(name = "CARTOIO")
-public class CartOIO {
-
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- private long id;
-
- @OneToMany
- @JoinColumn(name = "cart_id") // we need to duplicate the physical information
- private Set items;
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- public Set getItems() {
- return items;
- }
-
- public void setItems(Set items) {
- this.items = items;
- }
-
-}
diff --git a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/oneToMany/model/Items.java b/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/oneToMany/model/Items.java
deleted file mode 100644
index f63a4855b5..0000000000
--- a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/oneToMany/model/Items.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package com.baeldung.hibernate.oneToMany.model;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.Table;
-
-@Entity
-@Table(name = "ITEMS")
-public class Items {
-
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- @Column(name = "id")
- private long id;
-
-
- @ManyToOne
- @JoinColumn(name = "cart_id", nullable = false)
- private Cart cart;
-
- // Hibernate requires no-args constructor
- public Items() {
- }
-
- public Items(Cart c) {
- this.cart = c;
- }
-
- public Cart getCart() {
- return cart;
- }
-
- public void setCart(Cart cart) {
- this.cart = cart;
- }
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
-}
diff --git a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/oneToMany/model/ItemsOIO.java b/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/oneToMany/model/ItemsOIO.java
deleted file mode 100644
index a3d6a796c5..0000000000
--- a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/oneToMany/model/ItemsOIO.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package com.baeldung.hibernate.oneToMany.model;
-
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.Table;
-
-@Entity
-@Table(name = "ITEMSOIO")
-public class ItemsOIO {
-
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- private long id;
-
- @ManyToOne
- @JoinColumn(name = "cart_id", insertable = false, updatable = false)
- private CartOIO cart;
-
- // Hibernate requires no-args constructor
- public ItemsOIO() {
- }
-
- public ItemsOIO(CartOIO c) {
- this.cart = c;
- }
-
- public CartOIO getCartOIO() {
- return cart;
- }
-
- public void setCartOIO(CartOIO cart) {
- this.cart = cart;
- }
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
-}
diff --git a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/pojo/Phone.java b/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/pojo/Phone.java
deleted file mode 100644
index d923bda5de..0000000000
--- a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/pojo/Phone.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package com.baeldung.hibernate.pojo;
-
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import java.io.Serializable;
-
-@Entity
-public class Phone implements Serializable {
-
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- private Integer id;
-
- private boolean deleted;
-
- private String number;
-
- public Phone() {
- }
-
- public Phone(String number) {
- this.number = number;
- }
-
- public Integer getId() {
- return id;
- }
-
- public void setId(Integer id) {
- this.id = id;
- }
-
- public boolean isDeleted() {
- return deleted;
- }
-
- public void setDeleted(boolean deleted) {
- this.deleted = deleted;
- }
-
- public String getNumber() {
- return number;
- }
-
- public void setNumber(String number) {
- this.number = number;
- }
-}
diff --git a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/wherejointable/Group.java b/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/wherejointable/Group.java
deleted file mode 100644
index 04684eceac..0000000000
--- a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/wherejointable/Group.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package com.baeldung.hibernate.wherejointable;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.ManyToMany;
-
-@Entity(name = "e_group")
-public class Group {
-
- @Id
- @GeneratedValue
- private Long id;
-
- private String name;
-
- @ManyToMany(mappedBy = "groups")
- private List users = new ArrayList<>();
-
- public Group(String name) {
- this.name = name;
- }
-
- public Long getId() {
- return id;
- }
-
- public void setId(Long id) {
- this.id = id;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public List getUsers() {
- return users;
- }
-
- public void setUsers(List users) {
- this.users = users;
- }
-
- @Override
- public String toString() {
- return "Group [name=" + name + "]";
- }
-
-}
diff --git a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/wherejointable/User.java b/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/wherejointable/User.java
deleted file mode 100644
index 7fc077eeb2..0000000000
--- a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/wherejointable/User.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package com.baeldung.hibernate.wherejointable;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.JoinTable;
-import javax.persistence.ManyToMany;
-
-import org.hibernate.annotations.WhereJoinTable;
-
-@Entity
-public class User {
-
- @Id
- @GeneratedValue
- private Long id;
-
- private String name;
-
- @ManyToMany
- @JoinTable(name = "r_user_group", joinColumns = @JoinColumn(name = "user_id"), inverseJoinColumns = @JoinColumn(name = "group_id"))
- private List groups = new ArrayList<>();
-
- @WhereJoinTable(clause = "role='MODERATOR'")
- @ManyToMany
- @JoinTable(name = "r_user_group", joinColumns = @JoinColumn(name = "user_id"), inverseJoinColumns = @JoinColumn(name = "group_id"))
- private List moderatorGroups = new ArrayList<>();
-
- public User(String name) {
- this.name = name;
- }
-
- public Long getId() {
- return id;
- }
-
- public void setId(Long id) {
- this.id = id;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public List getGroups() {
- return groups;
- }
-
- public void setGroups(List groups) {
- this.groups = groups;
- }
-
- public void setModeratorGroups(List moderatorGroups) {
- this.moderatorGroups = moderatorGroups;
- }
-
- public List getModeratorGroups() {
- return moderatorGroups;
- }
-
- @Override
- public String toString() {
- return "User [name=" + name + "]";
- }
-
-}
diff --git a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/wherejointable/UserGroupRelation.java b/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/wherejointable/UserGroupRelation.java
deleted file mode 100644
index 00dd19699c..0000000000
--- a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/wherejointable/UserGroupRelation.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.baeldung.hibernate.wherejointable;
-
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.EnumType;
-import javax.persistence.Enumerated;
-import javax.persistence.Id;
-
-@Entity(name = "r_user_group")
-public class UserGroupRelation implements Serializable {
-
- @Id
- @Column(name = "user_id", insertable = false, updatable = false)
- private final Long userId;
-
- @Id
- @Column(name = "group_id", insertable = false, updatable = false)
- private final Long groupId;
-
- @Enumerated(EnumType.STRING)
- private final UserGroupRole role;
-
- public UserGroupRelation(Long userId, Long groupId, UserGroupRole role) {
- this.userId = userId;
- this.groupId = groupId;
- this.role = role;
- }
-
-}
diff --git a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/wherejointable/UserGroupRole.java b/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/wherejointable/UserGroupRole.java
deleted file mode 100644
index 62d9cb28ea..0000000000
--- a/persistence-modules/hibernate-annotations/src/main/java/com/baeldung/hibernate/wherejointable/UserGroupRole.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.baeldung.hibernate.wherejointable;
-
-public enum UserGroupRole {
-
- MEMBER, MODERATOR
-
-}
diff --git a/persistence-modules/hibernate-annotations/src/main/resources/META-INF/persistence.xml b/persistence-modules/hibernate-annotations/src/main/resources/META-INF/persistence.xml
deleted file mode 100644
index 474eeb7a44..0000000000
--- a/persistence-modules/hibernate-annotations/src/main/resources/META-INF/persistence.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
- Hibernate EntityManager Demo
- true
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/src/main/resources/logback.xml b/persistence-modules/hibernate-annotations/src/main/resources/logback.xml
deleted file mode 100644
index 7d900d8ea8..0000000000
--- a/persistence-modules/hibernate-annotations/src/main/resources/logback.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
- %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/src/test/java/com/baeldung/hibernate/customtypes/HibernateCustomTypesManualTest.java b/persistence-modules/hibernate-annotations/src/test/java/com/baeldung/hibernate/customtypes/HibernateCustomTypesManualTest.java
deleted file mode 100644
index 63dc6330be..0000000000
--- a/persistence-modules/hibernate-annotations/src/test/java/com/baeldung/hibernate/customtypes/HibernateCustomTypesManualTest.java
+++ /dev/null
@@ -1,90 +0,0 @@
-package com.baeldung.hibernate.customtypes;
-
-import com.baeldung.hibernate.HibernateUtil;
-import org.hibernate.SessionFactory;
-import org.hibernate.query.Query;
-import org.junit.Assert;
-import org.junit.Test;
-
-import java.io.IOException;
-import java.time.LocalDate;
-
-import static org.hibernate.testing.transaction.TransactionUtil.doInHibernate;
-
-public class HibernateCustomTypesManualTest {
-
- @Test
- public void givenEmployee_whenSavedWithCustomTypes_thenEntityIsSaved() throws IOException {
-
- final OfficeEmployee e = new OfficeEmployee();
- e.setDateOfJoining(LocalDate.now());
-
- PhoneNumber number = new PhoneNumber(1, 222, 8781902);
- e.setEmployeeNumber(number);
-
- Address empAdd = new Address();
- empAdd.setAddressLine1("Street");
- empAdd.setAddressLine2("Area");
- empAdd.setCity("City");
- empAdd.setCountry("Country");
- empAdd.setZipCode(100);
-
- e.setEmpAddress(empAdd);
-
- Salary empSalary = new Salary();
- empSalary.setAmount(1000L);
- empSalary.setCurrency("USD");
- e.setSalary(empSalary);
-
- doInHibernate(this::sessionFactory, session -> {
- session.save(e);
- boolean contains = session.contains(e);
- Assert.assertTrue(contains);
- });
-
- }
-
- @Test
- public void givenEmployee_whenCustomTypeInQuery_thenReturnEntity() throws IOException {
-
- final OfficeEmployee e = new OfficeEmployee();
- e.setDateOfJoining(LocalDate.now());
-
- PhoneNumber number = new PhoneNumber(1, 222, 8781902);
- e.setEmployeeNumber(number);
-
- Address empAdd = new Address();
- empAdd.setAddressLine1("Street");
- empAdd.setAddressLine2("Area");
- empAdd.setCity("City");
- empAdd.setCountry("Country");
- empAdd.setZipCode(100);
- e.setEmpAddress(empAdd);
-
- Salary empSalary = new Salary();
- empSalary.setAmount(1000L);
- empSalary.setCurrency("USD");
- e.setSalary(empSalary);
-
- doInHibernate(this::sessionFactory, session -> {
- session.save(e);
-
- Query query = session.createQuery("FROM OfficeEmployee OE WHERE OE.empAddress.zipcode = :pinCode");
- query.setParameter("pinCode",100);
- int size = query.list().size();
-
- Assert.assertEquals(1, size);
- });
-
- }
-
- private SessionFactory sessionFactory() {
- try {
- return HibernateUtil.getSessionFactory("hibernate-customtypes.properties");
- } catch (IOException e) {
- e.printStackTrace();
- }
-
- return null;
- }
-}
diff --git a/persistence-modules/hibernate-annotations/src/test/java/com/baeldung/hibernate/joincolumn/JoinColumnIntegrationTest.java b/persistence-modules/hibernate-annotations/src/test/java/com/baeldung/hibernate/joincolumn/JoinColumnIntegrationTest.java
deleted file mode 100644
index 0998ff1d90..0000000000
--- a/persistence-modules/hibernate-annotations/src/test/java/com/baeldung/hibernate/joincolumn/JoinColumnIntegrationTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package com.baeldung.hibernate.joincolumn;
-
-import com.baeldung.hibernate.HibernateUtil;
-import java.io.IOException;
-import org.hibernate.Session;
-import org.hibernate.Transaction;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-
-public class JoinColumnIntegrationTest {
-
- private Session session;
- private Transaction transaction;
-
- @Before
- public void setUp() throws IOException {
- session = HibernateUtil.getSessionFactory("hibernate-spatial.properties")
- .openSession();
- transaction = session.beginTransaction();
- }
-
- @After
- public void tearDown() {
- transaction.rollback();
- session.close();
- }
-
- @Test
- public void givenOfficeEntity_setAddress_shouldPersist() {
- Office office = new Office();
-
- OfficeAddress address = new OfficeAddress();
- address.setZipCode("11-111");
- office.setAddress(address);
-
- session.save(office);
- session.flush();
- session.clear();
- }
-
- @Test
- public void givenEmployeeEntity_setEmails_shouldPersist() {
- OfficialEmployee employee = new OfficialEmployee();
-
- Email email = new Email();
- email.setAddress("example@email.com");
- email.setEmployee(employee);
-
- session.save(employee);
- session.flush();
- session.clear();
- }
-
-}
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/src/test/java/com/baeldung/hibernate/oneToMany/main/HibernateOneToManyAnnotationMainIntegrationTest.java b/persistence-modules/hibernate-annotations/src/test/java/com/baeldung/hibernate/oneToMany/main/HibernateOneToManyAnnotationMainIntegrationTest.java
deleted file mode 100644
index 3bc5a6e12a..0000000000
--- a/persistence-modules/hibernate-annotations/src/test/java/com/baeldung/hibernate/oneToMany/main/HibernateOneToManyAnnotationMainIntegrationTest.java
+++ /dev/null
@@ -1,95 +0,0 @@
-package com.baeldung.hibernate.oneToMany.main;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.hibernate.Session;
-import org.hibernate.SessionFactory;
-import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
-import org.hibernate.cfg.Configuration;
-import org.hibernate.dialect.H2Dialect;
-import org.hibernate.service.ServiceRegistry;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import com.baeldung.hibernate.oneToMany.model.Cart;
-import com.baeldung.hibernate.oneToMany.model.Items;
-
-public class HibernateOneToManyAnnotationMainIntegrationTest {
-
- private static SessionFactory sessionFactory;
-
- private Session session;
-
- public HibernateOneToManyAnnotationMainIntegrationTest() {
- }
-
- @BeforeClass
- public static void beforeTests() {
- Configuration configuration = new Configuration().addAnnotatedClass(Cart.class).addAnnotatedClass(Items.class)
- .setProperty("hibernate.dialect", H2Dialect.class.getName())
- .setProperty("hibernate.connection.driver_class", org.h2.Driver.class.getName())
- .setProperty("hibernate.connection.url", "jdbc:h2:mem:test")
- .setProperty("hibernate.connection.username", "sa").setProperty("hibernate.connection.password", "")
- .setProperty("hibernate.hbm2ddl.auto", "update");
- ServiceRegistry serviceRegistry = new StandardServiceRegistryBuilder()
- .applySettings(configuration.getProperties()).build();
- sessionFactory = configuration.buildSessionFactory(serviceRegistry);
- }
-
- @Before
- public void setUp() {
- session = sessionFactory.openSession();
- session.beginTransaction();
- }
-
- @Test
- public void givenSession_checkIfDatabaseIsEmpty() {
- Cart cart = (Cart) session.get(Cart.class, new Long(1));
- assertNull(cart);
-
- }
-
- @Test
- public void givenSession_checkIfDatabaseIsPopulated_afterCommit() {
- Cart cart = new Cart();
- Set cartItems = new HashSet<>();
- cartItems = cart.getItems();
- Assert.assertNull(cartItems);
- Items item1 = new Items();
- item1.setCart(cart);
- assertNotNull(item1);
- Set itemsSet = new HashSet();
- itemsSet.add(item1);
- assertNotNull(itemsSet);
- cart.setItems(itemsSet);
- assertNotNull(cart);
- session.persist(cart);
- session.getTransaction().commit();
- session.close();
-
- session = sessionFactory.openSession();
- session.beginTransaction();
- cart = (Cart) session.get(Cart.class, new Long(1));
- assertNotNull(cart);
- }
-
- @After
- public void tearDown() {
- session.getTransaction().commit();
- session.close();
- }
-
- @AfterClass
- public static void afterTests() {
- sessionFactory.close();
- }
-
-}
diff --git a/persistence-modules/hibernate-annotations/src/test/java/com/baeldung/hibernate/wherejointable/HibernateWhereJoinTableIntegrationTest.java b/persistence-modules/hibernate-annotations/src/test/java/com/baeldung/hibernate/wherejointable/HibernateWhereJoinTableIntegrationTest.java
deleted file mode 100644
index 93783216ce..0000000000
--- a/persistence-modules/hibernate-annotations/src/test/java/com/baeldung/hibernate/wherejointable/HibernateWhereJoinTableIntegrationTest.java
+++ /dev/null
@@ -1,118 +0,0 @@
-package com.baeldung.hibernate.wherejointable;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.util.List;
-
-import org.hibernate.Session;
-import org.hibernate.SessionFactory;
-import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
-import org.hibernate.cfg.Configuration;
-import org.hibernate.dialect.H2Dialect;
-import org.hibernate.service.ServiceRegistry;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-public class HibernateWhereJoinTableIntegrationTest {
-
- private static SessionFactory sessionFactory;
-
- private Session session;
-
- /**
- * Test data
- */
- private User user1;
- private User user2;
- private User user3;
- private Group group1;
- private Group group2;
-
- @BeforeClass
- public static void beforeTests() {
- Configuration configuration = new Configuration().addAnnotatedClass(User.class)
- .addAnnotatedClass(Group.class)
- .addAnnotatedClass(UserGroupRelation.class)
- .setProperty("hibernate.dialect", H2Dialect.class.getName())
- .setProperty("hibernate.connection.driver_class", org.h2.Driver.class.getName())
- .setProperty("hibernate.connection.url", "jdbc:h2:mem:test")
- .setProperty("hibernate.connection.username", "sa")
- .setProperty("hibernate.connection.password", "")
- .setProperty("hibernate.hbm2ddl.auto", "update");
-
- ServiceRegistry serviceRegistry = new StandardServiceRegistryBuilder()
- .applySettings(configuration.getProperties())
- .build();
-
- sessionFactory = configuration.buildSessionFactory(serviceRegistry);
- }
-
- @Before
- public void setUp() {
- session = sessionFactory.openSession();
- session.beginTransaction();
-
- user1 = new User("user1");
- user2 = new User("user2");
- user3 = new User("user3");
-
- group1 = new Group("group1");
- group2 = new Group("group2");
-
- session.save(group1);
- session.save(group2);
-
- session.save(user1);
- session.save(user2);
- session.save(user3);
-
- saveRelation(user1, group1, UserGroupRole.MODERATOR);
- saveRelation(user2, group1, UserGroupRole.MODERATOR);
- saveRelation(user3, group1, UserGroupRole.MEMBER);
-
- saveRelation(user1, group2, UserGroupRole.MEMBER);
- saveRelation(user2, group2, UserGroupRole.MODERATOR);
- }
-
- @After
- public void tearDown() {
- session.getTransaction().commit();
- session.close();
- }
-
- @AfterClass
- public static void afterTests() {
- sessionFactory.close();
- }
-
- @Test
- public void givenUser1_getGroups_returnsAllGroups() {
- List groups = user1.getGroups();
- assertEquals(2, groups.size());
-
- assertTrue(groups.contains(group1));
- assertTrue(groups.contains(group2));
- }
-
- @Test
- public void givenUser1_getModeratorGroups_returnsOnlyModeratorGroups() {
- List groups = user1.getModeratorGroups();
- assertEquals(1, groups.size());
-
- assertTrue(groups.contains(group1));
- }
-
- private void saveRelation(User user, Group group, UserGroupRole role) {
- UserGroupRelation relation = new UserGroupRelation(user.getId(), group.getId(), role);
-
- session.save(relation);
- session.flush();
- session.refresh(user);
- session.refresh(group);
- }
-
-}
diff --git a/persistence-modules/hibernate-annotations/src/test/resources/hibernate-spatial.properties b/persistence-modules/hibernate-annotations/src/test/resources/hibernate-spatial.properties
deleted file mode 100644
index 1657c838e3..0000000000
--- a/persistence-modules/hibernate-annotations/src/test/resources/hibernate-spatial.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-hibernate.connection.driver_class=org.h2.Driver
-hibernate.connection.url=jdbc:h2:mem:mydb1;DB_CLOSE_DELAY=-1
-hibernate.connection.username=sa
-hibernate.connection.autocommit=true
-jdbc.password=
-
-hibernate.dialect=org.hibernate.spatial.dialect.h2geodb.GeoDBDialect
-hibernate.show_sql=true
-hibernate.hbm2ddl.auto=create-drop
-
-hibernate.c3p0.min_size=5
-hibernate.c3p0.max_size=20
-hibernate.c3p0.acquire_increment=5
-hibernate.c3p0.timeout=1800
diff --git a/persistence-modules/hibernate-annotations/src/test/resources/log4j.xml b/persistence-modules/hibernate-annotations/src/test/resources/log4j.xml
deleted file mode 100644
index 2d153af124..0000000000
--- a/persistence-modules/hibernate-annotations/src/test/resources/log4j.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/src/test/resources/log4j2.xml b/persistence-modules/hibernate-annotations/src/test/resources/log4j2.xml
deleted file mode 100644
index c5d0f12462..0000000000
--- a/persistence-modules/hibernate-annotations/src/test/resources/log4j2.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/src/test/resources/logback.xml b/persistence-modules/hibernate-annotations/src/test/resources/logback.xml
deleted file mode 100644
index 9e591977d7..0000000000
--- a/persistence-modules/hibernate-annotations/src/test/resources/logback.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
- %d{yyyy-MM-dd HH:mm:ss} | %-5p | [%thread] %logger{5}:%L - %msg%n
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/hibernate-annotations/src/test/resources/profile.png b/persistence-modules/hibernate-annotations/src/test/resources/profile.png
deleted file mode 100644
index 1cd4e978b9..0000000000
Binary files a/persistence-modules/hibernate-annotations/src/test/resources/profile.png and /dev/null differ
diff --git a/persistence-modules/spring-boot-persistence-h2-console/.gitignore b/persistence-modules/spring-boot-persistence-h2-console/.gitignore
deleted file mode 100644
index f35a1af429..0000000000
--- a/persistence-modules/spring-boot-persistence-h2-console/.gitignore
+++ /dev/null
@@ -1,235 +0,0 @@
-### Gradle ###
-.gradle
-build/
-
-# Ignore Gradle GUI config
-gradle-app.setting
-
-# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
-!gradle-wrapper.jar
-
-# Cache of project
-.gradletasknamecache
-
-# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
-# gradle/wrapper/gradle-wrapper.properties
-
-### Gradle Patch ###
-**/build/
-
-### Intellij ###
-# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
-# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
-
-# User-specific stuff
-.idea/**/workspace.xml
-.idea/**/tasks.xml
-.idea/**/usage.statistics.xml
-.idea/**/dictionaries
-.idea/**/shelf
-
-# Generated files
-.idea/**/contentModel.xml
-
-# Sensitive or high-churn files
-.idea/**/dataSources/
-.idea/**/dataSources.ids
-.idea/**/dataSources.local.xml
-.idea/**/sqlDataSources.xml
-.idea/**/dynamic.xml
-.idea/**/uiDesigner.xml
-.idea/**/dbnavigator.xml
-
-# Gradle
-.idea/**/gradle.xml
-.idea/**/libraries
-
-# Gradle and Maven with auto-import
-# When using Gradle or Maven with auto-import, you should exclude module files,
-# since they will be recreated, and may cause churn. Uncomment if using
-# auto-import.
-# .idea/modules.xml
-# .idea/*.iml
-# .idea/modules
-# *.iml
-# *.ipr
-
-# CMake
-cmake-build-*/
-
-# Mongo Explorer plugin
-.idea/**/mongoSettings.xml
-
-# File-based project format
-*.iws
-
-# IntelliJ
-out/
-
-# mpeltonen/sbt-idea plugin
-.idea_modules/
-
-# JIRA plugin
-atlassian-ide-plugin.xml
-
-# Cursive Clojure plugin
-.idea/replstate.xml
-
-# Crashlytics plugin (for Android Studio and IntelliJ)
-com_crashlytics_export_strings.xml
-crashlytics.properties
-crashlytics-build.properties
-fabric.properties
-
-# Editor-based Rest Client
-.idea/httpRequests
-
-# Android studio 3.1+ serialized cache file
-.idea/caches/build_file_checksums.ser
-
-### Intellij Patch ###
-# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
-
-# *.iml
-# modules.xml
-# .idea/misc.xml
-# *.ipr
-
-# Sonarlint plugin
-.idea/sonarlint
-
-
-### Intellij+iml ###
-# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
-# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
-
-# User-specific stuff
-.idea/**/workspace.xml
-.idea/**/tasks.xml
-.idea/**/usage.statistics.xml
-.idea/**/dictionaries
-.idea/**/shelf
-
-# Generated files
-.idea/**/contentModel.xml
-
-# Sensitive or high-churn files
-.idea/**/dataSources/
-.idea/**/dataSources.ids
-.idea/**/dataSources.local.xml
-.idea/**/sqlDataSources.xml
-.idea/**/dynamic.xml
-.idea/**/uiDesigner.xml
-.idea/**/dbnavigator.xml
-
-# Gradle
-.idea/**/gradle.xml
-.idea/**/libraries
-
-# Gradle and Maven with auto-import
-# When using Gradle or Maven with auto-import, you should exclude module files,
-# since they will be recreated, and may cause churn. Uncomment if using
-# auto-import.
-# .idea/modules.xml
-# .idea/*.iml
-# .idea/modules
-# *.iml
-# *.ipr
-
-# CMake
-cmake-build-*/
-
-# Mongo Explorer plugin
-.idea/**/mongoSettings.xml
-
-# File-based project format
-*.iws
-
-# IntelliJ
-out/
-
-# mpeltonen/sbt-idea plugin
-.idea_modules/
-
-# JIRA plugin
-atlassian-ide-plugin.xml
-
-# Cursive Clojure plugin
-.idea/replstate.xml
-
-# Crashlytics plugin (for Android Studio and IntelliJ)
-com_crashlytics_export_strings.xml
-crashlytics.properties
-crashlytics-build.properties
-fabric.properties
-
-# Editor-based Rest Client
-.idea/httpRequests
-
-# Android studio 3.1+ serialized cache file
-.idea/caches/build_file_checksums.ser
-
-### Intellij+iml Patch ###
-# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
-
-*.iml
-modules.xml
-.idea/misc.xml
-*.ipr
-
-### Maven ###
-target/
-pom.xml.tag
-pom.xml.releaseBackup
-pom.xml.versionsBackup
-pom.xml.next
-release.properties
-dependency-reduced-pom.xml
-buildNumber.properties
-.mvn/timing.properties
-.mvn/wrapper/maven-wrapper.jar
-.flattened-pom.xml
-
-# CMake
-cmake-build-*/
-
-# Mongo Explorer plugin
-.idea/**/mongoSettings.xml
-
-# File-based project format
-*.iws
-
-# IntelliJ
-out/
-
-# mpeltonen/sbt-idea plugin
-.idea_modules/
-
-# JIRA plugin
-atlassian-ide-plugin.xml
-
-# Cursive Clojure plugin
-.idea/replstate.xml
-
-# Crashlytics plugin (for Android Studio and IntelliJ)
-com_crashlytics_export_strings.xml
-crashlytics.properties
-crashlytics-build.properties
-fabric.properties
-
-# Editor-based Rest Client
-.idea/httpRequests
-
-# Android studio 3.1+ serialized cache file
-.idea/caches/build_file_checksums.ser
-
-### Intellij Patch ###
-# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
-
-# *.iml
-# modules.xml
-# .idea/misc.xml
-# *.ipr
-
-# Sonarlint plugin
-.idea/sonarlint
diff --git a/persistence-modules/spring-boot-persistence-h2-console/README.md b/persistence-modules/spring-boot-persistence-h2-console/README.md
deleted file mode 100644
index 7e32343358..0000000000
--- a/persistence-modules/spring-boot-persistence-h2-console/README.md
+++ /dev/null
@@ -1,2 +0,0 @@
-### 相关文章:
-- [Spring Boot 使用 H2 数据库的控制台(Console)](https://www.cwiki.us/pages/viewpage.action?pageId=57938747)
diff --git a/persistence-modules/spring-boot-persistence-h2-console/pom.xml b/persistence-modules/spring-boot-persistence-h2-console/pom.xml
deleted file mode 100644
index 1e4c7bbdfd..0000000000
--- a/persistence-modules/spring-boot-persistence-h2-console/pom.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
- 4.0.0
- com.ossez.h2db
- spring-boot-persistence-h2-console
- spring-boot-persistence-h2-console
- jar
- Demo Spring Boot applications that starts H2 in memory database
-
-
- com.ossez
- parent-boot-2
- 0.0.1-SNAPSHOT
- ../../parent-boot-2
-
-
-
-
- org.springframework.boot
- spring-boot-starter-data-jpa
-
-
- org.springframework.boot
- spring-boot-starter-validation
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
- com.h2database
- h2
-
-
- org.projectlombok
- lombok
- ${lombok.version}
- compile
-
-
- org.hibernate
- hibernate-core
- ${hibernate.version}
-
-
- com.vladmihalcea
- db-util
- ${db-util.version}
-
-
-
-
-
- com.ossez.h2db.demo.server.SpringBootApp
- 2.2.4.RELEASE
- 5.4.24.Final
- 1.0.4
-
-
-
diff --git a/persistence-modules/spring-boot-persistence-h2-console/src/main/java/com/ossez/h2db/springboot/SpringBootH2ConsoleApplication.java b/persistence-modules/spring-boot-persistence-h2-console/src/main/java/com/ossez/h2db/springboot/SpringBootH2ConsoleApplication.java
deleted file mode 100644
index aa15be073f..0000000000
--- a/persistence-modules/spring-boot-persistence-h2-console/src/main/java/com/ossez/h2db/springboot/SpringBootH2ConsoleApplication.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package com.ossez.h2db.springboot;
-
-import org.springframework.boot.CommandLineRunner;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.annotation.Bean;
-
-import java.util.Arrays;
-
-/**
- * MAIN APPLICATION
- */
-@SpringBootApplication
-public class SpringBootH2ConsoleApplication {
-
- public static void main(String... args) {
- SpringApplication.run(SpringBootH2ConsoleApplication.class, args);
- }
-
- @Bean
- public CommandLineRunner commandLineRunner(ApplicationContext ctx) {
- return args -> {
-
- System.out.println("Let's inspect the beans provided by Spring Boot:");
-
- String[] beanNames = ctx.getBeanDefinitionNames();
- Arrays.sort(beanNames);
- for (String beanName : beanNames) {
- System.out.println(beanName);
- }
-
- };
- }
-
-}
diff --git a/persistence-modules/spring-boot-persistence-h2-console/src/main/java/com/ossez/h2db/springboot/daos/UserRepository.java b/persistence-modules/spring-boot-persistence-h2-console/src/main/java/com/ossez/h2db/springboot/daos/UserRepository.java
deleted file mode 100644
index 5f8cb61fef..0000000000
--- a/persistence-modules/spring-boot-persistence-h2-console/src/main/java/com/ossez/h2db/springboot/daos/UserRepository.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.ossez.h2db.springboot.daos;
-
-import com.ossez.h2db.springboot.models.User;
-import org.springframework.data.repository.CrudRepository;
-
-public interface UserRepository extends CrudRepository {
-}
diff --git a/persistence-modules/spring-boot-persistence-h2-console/src/main/java/com/ossez/h2db/springboot/models/User.java b/persistence-modules/spring-boot-persistence-h2-console/src/main/java/com/ossez/h2db/springboot/models/User.java
deleted file mode 100644
index 80181bdcf5..0000000000
--- a/persistence-modules/spring-boot-persistence-h2-console/src/main/java/com/ossez/h2db/springboot/models/User.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package com.ossez.h2db.springboot.models;
-
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-@Table(name = "user")
-@Entity
-public class User {
-
- @Id
- @GeneratedValue
- private int id;
-
- private String firstName;
-
- private String lastName;
-
- public User() {
- }
-
- public int getId() {
- return id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getFirstName() {
- return firstName;
- }
-
- public void setFirstName(String firstName) {
- this.firstName = firstName;
- }
-
- public String getLastName() {
- return lastName;
- }
-
- public void setLastName(String lastName) {
- this.lastName = lastName;
- }
-
- @Override
- public String toString() {
- return "User{" +
- "id=" + id +
- ", firstName='" + firstName + '\'' +
- ", lastName='" + lastName + '\'' +
- '}';
- }
-}
diff --git a/persistence-modules/spring-boot-persistence-h2-console/src/main/resources/application.properties b/persistence-modules/spring-boot-persistence-h2-console/src/main/resources/application.properties
deleted file mode 100644
index 82a2e24211..0000000000
--- a/persistence-modules/spring-boot-persistence-h2-console/src/main/resources/application.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-spring.datasource.url=jdbc:h2:mem:mydb;DB_CLOSE_ON_EXIT=FALSE
-spring.datasource.driverClassName=org.h2.Driver
-spring.datasource.username=sa
-spring.datasource.password=
-spring.datasource.data=classpath:data-trans.sql
-
-# JPA
-spring.jpa.hibernate.ddl-auto=create-drop
-spring.jpa.show-sql=true
-spring.jpa.properties.hibernate.format_sql=true
-spring.jpa.properties.hibernate.validator.apply_to_ddl=false
-#spring.jpa.properties.hibernate.check_nullability=true
-
-spring.h2.console.enabled=true
-spring.h2.console.path=/h2-console
-debug=true
diff --git a/persistence-modules/spring-boot-persistence-h2-console/src/main/resources/data-trans.sql b/persistence-modules/spring-boot-persistence-h2-console/src/main/resources/data-trans.sql
deleted file mode 100644
index c644c02b48..0000000000
--- a/persistence-modules/spring-boot-persistence-h2-console/src/main/resources/data-trans.sql
+++ /dev/null
@@ -1,21 +0,0 @@
-DROP TABLE IF EXISTS billionaires;
-
-CREATE TABLE billionaires (
- id INT AUTO_INCREMENT PRIMARY KEY,
- first_name VARCHAR(250) NOT NULL,
- last_name VARCHAR(250) NOT NULL,
- career VARCHAR(250) DEFAULT NULL
-);
-
-INSERT INTO billionaires (first_name, last_name, career) VALUES
-('Aliko', 'Dangote', 'Billionaire Industrialist'),
-('Bill', 'Gates', 'Billionaire Tech Entrepreneur'),
-('Folrunsho', 'Alakija', 'Billionaire Oil Magnate');
-
-insert into USER values (101, 'user1', 'comment1');
-insert into USER values (102, 'user2', 'comment2');
-insert into USER values (103, 'user3', 'comment3');
-insert into USER values (104, 'user4', 'comment4');
-insert into USER values (105, 'user5', 'comment5');
-
-
diff --git a/persistence-modules/spring-boot-persistence-h2-console/src/test/resources/application.properties b/persistence-modules/spring-boot-persistence-h2-console/src/test/resources/application.properties
deleted file mode 100644
index 3a6470c8dc..0000000000
--- a/persistence-modules/spring-boot-persistence-h2-console/src/test/resources/application.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-# spring.datasource.x
-spring.datasource.driver-class-name=org.h2.Driver
-spring.datasource.url=jdbc:h2:mem:db;DB_CLOSE_DELAY=-1
-spring.datasource.username=sa
-spring.datasource.password=sa
-
-# hibernate.X
-hibernate.dialect=org.hibernate.dialect.H2Dialect
-hibernate.show_sql=true
-hibernate.hbm2ddl.auto=create-drop
-hibernate.cache.use_second_level_cache=true
-hibernate.cache.use_query_cache=true
-hibernate.cache.region.factory_class=org.hibernate.cache.ehcache.EhCacheRegionFactory
-
-spring.jpa.properties.hibernate.hbm2ddl.import_files=migrated_users.sql, import_books.sql
-spring.datasource.data=import_*_users.sql
\ No newline at end of file
diff --git a/persistence-modules/spring-boot-persistence-h2-console/src/test/resources/migrated_users.sql b/persistence-modules/spring-boot-persistence-h2-console/src/test/resources/migrated_users.sql
deleted file mode 100644
index 11d1a69110..0000000000
--- a/persistence-modules/spring-boot-persistence-h2-console/src/test/resources/migrated_users.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-insert into USERS(name, status, id) values('Peter', 1, 7);
-insert into USERS(name, status, id) values('David', 1, 8);
-insert into USERS(name, status, id) values('Ed', 1, 9);