From 56448fafa2f30f9e603a38a83a17851261e6fd63 Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Tue, 14 Jul 2015 14:46:02 -0500 Subject: [PATCH] HHH-9916 - Update quickstarts and tutorials for 5.0 + convert to asciidoc(tor) --- documentation/documentation.gradle | 103 +++--- .../asciidoc/quickstart/guides/index.adoc | 18 + .../asciidoc/quickstart/guides/obtaining.adoc | 55 +++ .../asciidoc/quickstart/guides/preface.adoc | 35 ++ .../guides/tutorial_annotations.adoc | 103 ++++++ .../quickstart/guides/tutorial_envers.adoc | 64 ++++ .../quickstart/guides/tutorial_jpa.adoc | 115 ++++++ .../quickstart/guides/tutorial_native.adoc | 231 ++++++++++++ .../quickstart/guides/tutorial_osgi.adoc | 17 + .../quickstart/tutorials/annotations/pom.xml | 0 .../AnnotationsIllustrationTest.java | 24 +- .../hibernate/tutorial/annotations/Event.java | 0 .../src/test/resources/hibernate.cfg.xml | 0 .../quickstart/tutorials/basic/pom.xml | 0 .../org/hibernate/tutorial/hbm/Event.hbm.xml | 0 .../org/hibernate/tutorial/hbm/Event.java | 0 .../hbm/NativeApiIllustrationTest.java | 25 +- .../src/test/resources/hibernate.cfg.xml | 0 .../tutorials/entitymanager/pom.xml | 0 .../em/EntityManagerIllustrationTest.java | 0 .../java/org/hibernate/tutorial/em/Event.java | 0 .../test/resources/META-INF/persistence.xml | 0 .../quickstart/tutorials/envers/pom.xml | 0 .../envers/EnversIllustrationTest.java | 0 .../org/hibernate/tutorial/envers/Event.java | 0 .../test/resources/META-INF/persistence.xml | 0 .../quickstart/tutorials/pom.xml | 0 .../sessionfactory/CustomSessionFactory.adoc | 4 +- .../docbook/quickstart/en-US/Author_Group.xml | 67 ---- .../en-US/Hibernate_Getting_Started_Guide.ent | 11 - .../en-US/Hibernate_Getting_Started_Guide.xml | 54 --- .../quickstart/en-US/content/obtaining.xml | 187 ---------- .../quickstart/en-US/content/preface.xml | 103 ------ .../en-US/content/tutorial_annotations.xml | 133 ------- .../en-US/content/tutorial_envers.xml | 107 ------ .../quickstart/en-US/content/tutorial_jpa.xml | 145 -------- .../en-US/content/tutorial_native.xml | 342 ------------------ .../en-US/content/tutorial_osgi.xml | 110 ------ .../en-US/images/hibernate_logo_a.png | Bin 31862 -> 0 bytes .../tutorials/osgi/datasource-h2.xml | 28 -- .../tutorials/osgi/managed-jpa/.gitignore | 1 - .../tutorials/osgi/managed-jpa/features.xml | 81 ----- .../tutorials/osgi/managed-jpa/pom.xml | 70 ---- .../hibernate/osgitest/DataPointService.java | 37 -- .../osgitest/DataPointServiceImpl.java | 58 --- .../osgitest/command/AddCommand.java | 44 --- .../osgitest/command/DeleteAllCommand.java | 37 -- .../osgitest/command/GetAllCommand.java | 43 --- .../hibernate/osgitest/entity/DataPoint.java | 53 --- .../main/resources/META-INF/persistence.xml | 21 -- .../OSGI-INF/blueprint/blueprint.xml | 46 --- .../tutorials/osgi/unmanaged-jpa/.gitignore | 1 - .../tutorials/osgi/unmanaged-jpa/features.xml | 47 --- .../tutorials/osgi/unmanaged-jpa/pom.xml | 81 ----- .../hibernate/osgitest/DataPointService.java | 41 --- .../osgitest/DataPointServiceImpl.java | 78 ---- .../org/hibernate/osgitest/HibernateUtil.java | 57 --- .../hibernate/osgitest/TestIntegrator.java | 45 --- .../TestStrategyRegistrationProvider.java | 37 -- .../osgitest/TestTypeContributor.java | 37 -- .../osgitest/command/AddCommand.java | 44 --- .../osgitest/command/DeleteAllCommand.java | 37 -- .../osgitest/command/GetAllCommand.java | 43 --- .../osgitest/command/UpdateCommand.java | 47 --- .../hibernate/osgitest/entity/DataPoint.java | 53 --- .../main/resources/META-INF/persistence.xml | 24 -- .../OSGI-INF/blueprint/blueprint.xml | 50 --- .../osgi/unmanaged-native/.gitignore | 1 - .../osgi/unmanaged-native/features.xml | 79 ---- .../tutorials/osgi/unmanaged-native/pom.xml | 89 ----- .../hibernate/osgitest/DataPointService.java | 47 --- .../osgitest/DataPointServiceImpl.java | 103 ------ .../org/hibernate/osgitest/HibernateUtil.java | 53 --- .../hibernate/osgitest/TestIntegrator.java | 45 --- .../TestStrategyRegistrationProvider.java | 37 -- .../osgitest/TestTypeContributor.java | 37 -- .../osgitest/command/AddCommand.java | 44 --- .../osgitest/command/DeleteAllCommand.java | 37 -- .../osgitest/command/GetAllCommand.java | 43 --- .../osgitest/command/GetCommand.java | 43 --- .../osgitest/command/GetRevisionsCommand.java | 48 --- .../osgitest/command/LoadCommand.java | 43 --- .../osgitest/command/UpdateCommand.java | 47 --- .../hibernate/osgitest/entity/DataPoint.java | 58 --- .../OSGI-INF/blueprint/blueprint.xml | 65 ---- .../src/main/resources/ehcache.xml | 94 ----- .../src/main/resources/hibernate.cfg.xml | 52 --- .../src/main/resources/pool-one.properties | 13 - 88 files changed, 724 insertions(+), 3648 deletions(-) create mode 100644 documentation/src/main/asciidoc/quickstart/guides/index.adoc create mode 100644 documentation/src/main/asciidoc/quickstart/guides/obtaining.adoc create mode 100644 documentation/src/main/asciidoc/quickstart/guides/preface.adoc create mode 100644 documentation/src/main/asciidoc/quickstart/guides/tutorial_annotations.adoc create mode 100644 documentation/src/main/asciidoc/quickstart/guides/tutorial_envers.adoc create mode 100644 documentation/src/main/asciidoc/quickstart/guides/tutorial_jpa.adoc create mode 100644 documentation/src/main/asciidoc/quickstart/guides/tutorial_native.adoc create mode 100644 documentation/src/main/asciidoc/quickstart/guides/tutorial_osgi.adoc rename documentation/src/main/{docbook => asciidoc}/quickstart/tutorials/annotations/pom.xml (100%) rename documentation/src/main/{docbook => asciidoc}/quickstart/tutorials/annotations/src/test/java/org/hibernate/tutorial/annotations/AnnotationsIllustrationTest.java (78%) rename documentation/src/main/{docbook => asciidoc}/quickstart/tutorials/annotations/src/test/java/org/hibernate/tutorial/annotations/Event.java (100%) rename documentation/src/main/{docbook => asciidoc}/quickstart/tutorials/annotations/src/test/resources/hibernate.cfg.xml (100%) rename documentation/src/main/{docbook => asciidoc}/quickstart/tutorials/basic/pom.xml (100%) rename documentation/src/main/{docbook => asciidoc}/quickstart/tutorials/basic/src/test/java/org/hibernate/tutorial/hbm/Event.hbm.xml (100%) rename documentation/src/main/{docbook => asciidoc}/quickstart/tutorials/basic/src/test/java/org/hibernate/tutorial/hbm/Event.java (100%) rename documentation/src/main/{docbook => asciidoc}/quickstart/tutorials/basic/src/test/java/org/hibernate/tutorial/hbm/NativeApiIllustrationTest.java (75%) rename documentation/src/main/{docbook => asciidoc}/quickstart/tutorials/basic/src/test/resources/hibernate.cfg.xml (100%) rename documentation/src/main/{docbook => asciidoc}/quickstart/tutorials/entitymanager/pom.xml (100%) rename documentation/src/main/{docbook => asciidoc}/quickstart/tutorials/entitymanager/src/test/java/org/hibernate/tutorial/em/EntityManagerIllustrationTest.java (100%) rename documentation/src/main/{docbook => asciidoc}/quickstart/tutorials/entitymanager/src/test/java/org/hibernate/tutorial/em/Event.java (100%) rename documentation/src/main/{docbook => asciidoc}/quickstart/tutorials/entitymanager/src/test/resources/META-INF/persistence.xml (100%) rename documentation/src/main/{docbook => asciidoc}/quickstart/tutorials/envers/pom.xml (100%) rename documentation/src/main/{docbook => asciidoc}/quickstart/tutorials/envers/src/test/java/org/hibernate/tutorial/envers/EnversIllustrationTest.java (100%) rename documentation/src/main/{docbook => asciidoc}/quickstart/tutorials/envers/src/test/java/org/hibernate/tutorial/envers/Event.java (100%) rename documentation/src/main/{docbook => asciidoc}/quickstart/tutorials/envers/src/test/resources/META-INF/persistence.xml (100%) rename documentation/src/main/{docbook => asciidoc}/quickstart/tutorials/pom.xml (100%) delete mode 100644 documentation/src/main/docbook/quickstart/en-US/Author_Group.xml delete mode 100644 documentation/src/main/docbook/quickstart/en-US/Hibernate_Getting_Started_Guide.ent delete mode 100644 documentation/src/main/docbook/quickstart/en-US/Hibernate_Getting_Started_Guide.xml delete mode 100644 documentation/src/main/docbook/quickstart/en-US/content/obtaining.xml delete mode 100644 documentation/src/main/docbook/quickstart/en-US/content/preface.xml delete mode 100644 documentation/src/main/docbook/quickstart/en-US/content/tutorial_annotations.xml delete mode 100644 documentation/src/main/docbook/quickstart/en-US/content/tutorial_envers.xml delete mode 100644 documentation/src/main/docbook/quickstart/en-US/content/tutorial_jpa.xml delete mode 100644 documentation/src/main/docbook/quickstart/en-US/content/tutorial_native.xml delete mode 100644 documentation/src/main/docbook/quickstart/en-US/content/tutorial_osgi.xml delete mode 100644 documentation/src/main/docbook/quickstart/en-US/images/hibernate_logo_a.png delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/datasource-h2.xml delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/.gitignore delete mode 100755 documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/features.xml delete mode 100755 documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/pom.xml delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/src/main/java/org/hibernate/osgitest/DataPointService.java delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/src/main/java/org/hibernate/osgitest/DataPointServiceImpl.java delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/src/main/java/org/hibernate/osgitest/command/AddCommand.java delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/src/main/java/org/hibernate/osgitest/command/DeleteAllCommand.java delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/src/main/java/org/hibernate/osgitest/command/GetAllCommand.java delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/src/main/java/org/hibernate/osgitest/entity/DataPoint.java delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/src/main/resources/META-INF/persistence.xml delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/src/main/resources/OSGI-INF/blueprint/blueprint.xml delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/.gitignore delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/features.xml delete mode 100755 documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/pom.xml delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/DataPointService.java delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/DataPointServiceImpl.java delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/HibernateUtil.java delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/TestIntegrator.java delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/TestStrategyRegistrationProvider.java delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/TestTypeContributor.java delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/command/AddCommand.java delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/command/DeleteAllCommand.java delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/command/GetAllCommand.java delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/command/UpdateCommand.java delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/entity/DataPoint.java delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/resources/META-INF/persistence.xml delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/resources/OSGI-INF/blueprint/blueprint.xml delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/.gitignore delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/features.xml delete mode 100755 documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/pom.xml delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/DataPointService.java delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/DataPointServiceImpl.java delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/HibernateUtil.java delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/TestIntegrator.java delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/TestStrategyRegistrationProvider.java delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/TestTypeContributor.java delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/command/AddCommand.java delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/command/DeleteAllCommand.java delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/command/GetAllCommand.java delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/command/GetCommand.java delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/command/GetRevisionsCommand.java delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/command/LoadCommand.java delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/command/UpdateCommand.java delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/entity/DataPoint.java delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/resources/OSGI-INF/blueprint/blueprint.xml delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/resources/ehcache.xml delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/resources/hibernate.cfg.xml delete mode 100644 documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/resources/pool-one.properties diff --git a/documentation/documentation.gradle b/documentation/documentation.gradle index f4d9c4204d..4d17b690bf 100644 --- a/documentation/documentation.gradle +++ b/documentation/documentation.gradle @@ -1,3 +1,5 @@ +import org.asciidoctor.gradle.AsciidoctorTask + /* * Hibernate, Relational Persistence for Idiomatic Java * @@ -8,24 +10,23 @@ buildscript { repositories { mavenCentral() mavenLocal() + maven { name 'jboss-nexus' url "http://repository.jboss.org/nexus/content/groups/public/" } - maven { - name 'Bintray Asciidoctor repo' - url 'http://dl.bintray.com/content/aalmiray/asciidoctor' - } jcenter() } dependencies { classpath "org.jboss.jdocbook:gradle-jdocbook:1.2.2" - classpath 'org.asciidoctor:asciidoctor-gradle-plugin:0.7.0' + classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.2' } } apply plugin: "java" apply plugin: "jdocbook" +apply plugin: 'org.asciidoctor.convert' + apply from: "${rootProject.projectDir}/utilities.gradle" defaultTasks 'buildDocs' @@ -34,6 +35,7 @@ configurations { asciidoclet { description = 'Dependencies for Asciidoclet (the javadoc doclet tool for using Asciidoc)' } +// asciidoctor } if ( JavaVersion.current().isJava8Compatible() ) { @@ -45,6 +47,7 @@ if ( JavaVersion.current().isJava8Compatible() ) { dependencies { ext.pressgangVersion = '3.0.0' +// asciidoctor 'org.asciidoctor:asciidoctorj:1.5.2' asciidoclet 'org.asciidoctor:asciidoclet:0.+' jdocbookXsl "org.jboss.pressgang:pressgang-xslt-ns:${pressgangVersion}" @@ -162,10 +165,6 @@ jdocbook { } // book-specific config - quickstart { - masterSourceDocumentName = 'Hibernate_Getting_Started_Guide.xml' - } - devguide { masterSourceDocumentName = 'Hibernate_Development_Guide.xml' } @@ -188,7 +187,7 @@ stageStyles_devguide.doLast { } } -[ 'devguide', 'manual', 'quickstart' ].each { bookName -> +[ 'devguide', 'manual'].each { bookName -> task "stageLocalStyles_$bookName"(type: Copy) { into project.file( "target/docbook/stage/$bookName" ) from project.file( 'src/main/style' ) @@ -197,10 +196,46 @@ stageStyles_devguide.doLast { tasks[ "stageStyles_$bookName" ].dependsOn "stageLocalStyles_$bookName" } + +asciidoctor { + // we do not want it creating its "default task" + enabled = false +} + +// Topical Guides ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +task renderTopicalGuides(type: AsciidoctorTask, group: 'Documentation') { + description = 'Renders the Topical Guides in HTML format using Asciidoctor.' + sourceDir = file( 'src/main/asciidoc/topical' ) + outputDir = new File("$buildDir/asciidoc/topical/html") + backends "html5" + separateOutputDirs false + options logDocuments: true + attributes icons: 'font', experimental: true, 'source-highlighter': 'prettify' +} + +buildDocs.dependsOn renderTopicalGuides + + + +// Getting Started Guides (quick starts) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +task renderGettingStartedGuides(type: AsciidoctorTask, group: 'Documentation') { + description = 'Renders the Getting Started Guides (quick starts) in HTML format using Asciidoctor.' + sourceDir = file( 'src/main/asciidoc/quickstart/guides' ) + outputDir = new File("$buildDir/asciidoc/quickstart/html") + backends "html5" + separateOutputDirs false + options logDocuments: true + attributes icons: 'font', experimental: true, 'source-highlighter': 'prettify' +} + +buildDocs.dependsOn renderGettingStartedGuides + task buildTutorialZip(type: Zip) { - destinationDir = file( "target/work/tutorials" ) - archiveName = 'hibernate-tutorials.zip' - from 'src/main/docbook/quickstart/tutorials' + from 'src/main/asciidoc/quickstart/tutorials' + destinationDir = tasks.renderGettingStartedGuides.outputDir + archiveName = 'hibernate-tutorials.zip' expand( version: project.version, slf4j: "1.7.5", @@ -209,45 +244,5 @@ task buildTutorialZip(type: Zip) { ) } -buildDocs.dependsOn buildTutorialZip +renderGettingStartedGuides.dependsOn buildTutorialZip -buildDocs.doLast { - for ( File languageDir : dirList( "target/docbook/publish/quickstart" ) ) { - for ( File formatDir : dirList( languageDir ) ) { - final File copyDir = new File( formatDir, "files" ); - copyDir.mkdirs(); - ant.copy( file: buildTutorialZip.archivePath.getAbsolutePath(), todir: copyDir.getAbsolutePath() ) - } - } -} - -File[] dirList(String dirName) { - return dirList( (File) file(dirName) ); -} - -File[] dirList(File dir) { - return dir.listFiles({file -> file.isDirectory() } as FileFilter).sort(); -} - - -// asciidoctor ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -task asciidoctor(type: org.asciidoctor.gradle.AsciidoctorTask, group: 'Documentation') { - description = 'Generates the Asciidoc(tor) topical guides in HTML format.' - backend = 'html5' - sourceDir = file( 'src/main/asciidoc/topical' ) - outputDir = new File("$buildDir/asciidoc/topical/html") -} - -tasks.withType(org.asciidoctor.gradle.AsciidoctorTask) { docTask -> - options = [ - logDocuments: true, - attributes: [ - icons: 'font', - 'source-highlighter': 'prettify', - experimental: true - ] - ] -} - -buildDocs.dependsOn asciidoctor diff --git a/documentation/src/main/asciidoc/quickstart/guides/index.adoc b/documentation/src/main/asciidoc/quickstart/guides/index.adoc new file mode 100644 index 0000000000..04d686bfaa --- /dev/null +++ b/documentation/src/main/asciidoc/quickstart/guides/index.adoc @@ -0,0 +1,18 @@ += Hibernate Getting Started Guide +:toc: +:docinfo: + +include::preface.adoc[] + +:numbered: +include::obtaining.adoc[] + +include::tutorial_native.adoc[] + +include::tutorial_annotations.adoc[] + +include::tutorial_jpa.adoc[] + +include::tutorial_envers.adoc[] + +include::tutorial_osgi.adoc[] diff --git a/documentation/src/main/asciidoc/quickstart/guides/obtaining.adoc b/documentation/src/main/asciidoc/quickstart/guides/obtaining.adoc new file mode 100644 index 0000000000..bf52e391fc --- /dev/null +++ b/documentation/src/main/asciidoc/quickstart/guides/obtaining.adoc @@ -0,0 +1,55 @@ +[[obtaining]] +== Obtaining Hibernate + +=== The Hibernate Modules/Artifacts + +Hibernate's functionality is split into a number of modules/artifacts meant to isolate dependencies (modularity). + +hibernate-core:: The main (core) Hibernate module. Defines its ORM features and APIs as well as the various integration SPIs. +hibernate-entitymanager:: Defines Hibernate's support for link:$$http://jcp.org/en/jsr/detail?id=317$$[JPA] +hibernate-java8:: Support for using Java8 specific data-types such as any of the JSR 310 Date/Time types in domain model. +hibernate-envers:: Hibernate's historical entity versioning feature +hibernate-spatial:: Hibernate's Spatial/GIS data-type support +hibernate-osgi:: Hibernate support for running in OSGi containers. +hibernate-c3p0:: Integrates the link:$$http://www.mchange.com/projects/c3p0/$$[C3P0] connection pooling library into Hibernate +hibernate-hikaricp:: Integrates the link:$$http://brettwooldridge.github.io/HikariCP/$$[HikariCP] connection pooling library into Hibernate +hibernate-proxool:: Integrates the link:$$http://proxool.sourceforge.net/$$[Proxool] connection pooling library into Hibernate +hibernate-ehcache:: Integrates the link:$$http://ehcache.org/$$[Ehcache] caching library into Hibernate as a second-level cache provider. +hibernate-infinispan:: Integrates the link:$$http://infinispan.org/$$[Infinispan] caching library into Hibernate as a second-level cache provider. + + +=== Release Bundle Downloads + +The Hibernate team provides release bundles hosted on the SourceForge File Release System, in both +`TGZ` and `ZIP` formats. Each release bundle contains `JAR` files, documentation, source code, and other goodness. + +You can download releases of Hibernate, in your chosen format, from the list at +https://sourceforge.net/projects/hibernate/files/hibernate-orm/. The release bundle is structured as follows: + +* The `lib/required/` directory contains the `hibernate-core` jar and all of its dependencies. All of these jars are +required to be available on your classpath no matter which features of Hibernate are being used. +* The `/lib/jpa/` directory contains the `hibernate-entitymanager` jar as well as all of its dependencies (beyond +those in `lib/required/`) +* The `lib/java8/` directory contains the `hibernate-java8` jar and all of its dependencies (beyond those in `lib/required/`) +* The `lib/envers` directory contains the `hibernate-envers` jar and all of its dependencies (beyond those in +`lib/required/` and `lib/jpa/`). +* The `lib/spatial/` directory contains the `hibernate-spatial` jar and all of its dependencies (beyond those in `lib/required/`) +* The `lib/osgi/` directory contains the `hibernate-osgi` jar and all of its dependencies (beyond those in `lib/required/` and `lib/jpa/`) +* The `lib/optional/` directory contains the jars needed for the various connection pooling and second-level cache integrations +provided by Hibernate, along with their dependencies. + + +=== Maven Repository Artifacts + +The authoritative repository for Hibernate artifacts is the JBoss Maven repository. The Hibernate artifacts are +synced to Maven Central as part of an automated job (some small delay may occur). + +The team responsible for the JBoss Maven repository maintains a number of Wiki pages that contain important information: + +* http://community.jboss.org/docs/DOC-14900 - General information about the repository. +* http://community.jboss.org/docs/DOC-15170 - Information about setting up the JBoss repositories in order to do +development work on JBoss projects themselves. +* http://community.jboss.org/docs/DOC-15169 - Information about setting up access to the repository to use JBoss +projects as part of your own software. + +The Hibernate ORM artifacts are published under the `org.hibernate` groupId. \ No newline at end of file diff --git a/documentation/src/main/asciidoc/quickstart/guides/preface.adoc b/documentation/src/main/asciidoc/quickstart/guides/preface.adoc new file mode 100644 index 0000000000..77c2417a8a --- /dev/null +++ b/documentation/src/main/asciidoc/quickstart/guides/preface.adoc @@ -0,0 +1,35 @@ +[[preface]] + +[preface] +== Preface + +Working with both Object-Oriented software and Relational Databases can be cumbersome and time consuming. +Development costs are significantly higher due to a paradigm mismatch between how data is represented in objects +versus relational databases. Hibernate is an Object/Relational Mapping (ORM) solution for Java environments. The +term Object/Relational Mapping refers to the technique of mapping data between an object model representation to +a relational data model representation. See http://en.wikipedia.org/wiki/Object-relational_mapping for a good +high-level discussion. Also, Martin Fowler's link:$$http://martinfowler.com/bliki/OrmHate.html$$[OrmHate] article +takes a look at many of the mismatch problems. + +Although having a strong background in SQL is not required to use Hibernate, having a basic understanding of the +concepts can help you understand Hibernate more quickly and fully. An understanding of data modeling principles +is especially important. Both http://www.agiledata.org/essays/dataModeling101.html and +http://en.wikipedia.org/wiki/Data_modeling are good starting points for understanding these data modeling principles. + +Hibernate takes care of the mapping from Java classes to database tables, and from Java data types to SQL data +types. In addition, it provides data query and retrieval facilities. It can significantly reduce development +time otherwise spent with manual data handling in SQL and JDBC. Hibernate’s design goal is to relieve the +developer from 95% of common data persistence-related programming tasks by eliminating the need for manual, +hand-crafted data processing using SQL and JDBC. However, unlike many other persistence solutions, Hibernate +does not hide the power of SQL from you and guarantees that your investment in relational technology and +knowledge is as valid as always. + +Hibernate may not be the best solution for data-centric applications that only use stored-procedures to +implement the business logic in the database, it is most useful with object-oriented domain models and business +logic in the Java-based middle-tier. However, Hibernate can certainly help you to remove or encapsulate +vendor-specific SQL code and streamlines the common task of translating result sets from a tabular +representation to a graph of objects. + +See http://hibernate.org/orm/contribute/ for information on getting involved. + +IMPORTANT: The projects and code for the tutorials referenced in this guide are available as link:hibernate-tutorials.zip[] \ No newline at end of file diff --git a/documentation/src/main/asciidoc/quickstart/guides/tutorial_annotations.adoc b/documentation/src/main/asciidoc/quickstart/guides/tutorial_annotations.adoc new file mode 100644 index 0000000000..33d3ab8688 --- /dev/null +++ b/documentation/src/main/asciidoc/quickstart/guides/tutorial_annotations.adoc @@ -0,0 +1,103 @@ +[[tutorial_annotations]] +== Tutorial Using Native Hibernate APIs and Annotation Mappings + +NOTE: This tutorial is located within the download bundle under `annotations/`. + +.Objectives +- [*] Bootstrap a Hibernate `SessionFactory` +- [*] Use annotations to provide mapping information +- [*] Use the Hibernate native APIs + + +[[hibernate-gsg-tutorial-annotations-config]] +=== The Hibernate configuration file + +The contents are identical to <> with one important difference... +The `` element at the very end naming the annotated entity class using the `class` attribute. + + +[[hibernate-gsg-tutorial-annotations-entity]] +=== The annotated entity Java class + +The entity class in this tutorial is `org.hibernate.tutorial.annotations.Event` which follows JavaBean conventions. +In fact the class itself is identical to the one in <>, except that annotations +are used to provide the metadata, rather than a separate mapping file. + +[[hibernate-gsg-tutorial-annotations-entity-entity]] +.Identifying the class as an entity +==== +[source, JAVA] +---- +@Entity +@Table( name = "EVENTS" ) +public class Event { + ... +} +---- +==== + +The `@javax.persistence.Entity` annotation is used to mark a class as an entity. It functions the same as the +`` mapping element discussed in <>. Additionally the +`@javax.persistence.Table` annotation explicitly specifies the table name. Without this specification, the default +table name would be _EVENT_. + + +[[hibernate-gsg-tutorial-annotations-entity-id]] +.Identifying the identifier property +==== +[source, JAVA] +---- +@Id +@GeneratedValue(generator="increment") +@GenericGenerator(name="increment", strategy = "increment") +public Long getId() { + return id; +} +---- +==== + +`@javax.persistence.Id` marks the property which defines the entity's identifier. + +`@javax.persistence.GeneratedValue` and `@org.hibernate.annotations.GenericGenerator` work in tandem +to indicate that Hibernate should use Hibernate's `increment` generation strategy for this entity's identifier values. + + +[[hibernate-gsg-tutorial-annotations-entity-properties]] +.Identifying basic properties +==== +[source, JAVA] +---- +public String getTitle() { + return title; +} + +@Temporal(TemporalType.TIMESTAMP) +@Column(name = "EVENT_DATE") +public Date getDate() { + return date; +} +---- +==== + +As in <>. + + +[[hibernate-gsg-tutorial-annotations-further]] +=== Take it further! + +.Practice Exercises +- [ ] Add an association to the `Event` entity to model a message thread. Use the _Developer Guide_ +as a guide. +- [ ] Add a callback to receive notifications when an `Event` is created, updated or deleted. Try the same with +an event listener. Use the _Developer Guide_ as a guide. \ No newline at end of file diff --git a/documentation/src/main/asciidoc/quickstart/guides/tutorial_envers.adoc b/documentation/src/main/asciidoc/quickstart/guides/tutorial_envers.adoc new file mode 100644 index 0000000000..eba5a5348c --- /dev/null +++ b/documentation/src/main/asciidoc/quickstart/guides/tutorial_envers.adoc @@ -0,0 +1,64 @@ +[[tutorial_envers]] +== Tutorial Using Envers + +NOTE: This tutorial is located within the download bundle under `envers/`. + +.Objectives +- [*] Annotate an entity as historical +- [*] Configure Envers +- [*] Use the Envers APIs to view and analyze historical data + + +[[hibernate-gsg-tutorial-envers-config]] +=== persistence.xml + +This file was discussed in the JPA tutorial in <>, and is essentially the same here. + + +[[hibernate-gsg-tutorial-envers-entity]] +=== The annotated entity Java class + +Again, the entity is largely the same as in <>. The major difference is the +addition of the `@org.hibernate.envers.Audited` annotation, which tells Envers to automatically track changes to this +entity. + + +[[hibernate-gsg-tutorial-envers-test]] +=== Example code + +The code saves some entities, makes a change to one of the entities and then uses the Envers API to pull back the +initial revision as well as the updated revision. A revision refers to a historical snapshot of an entity. + + +[[hibernate-gsg-tutorial-envers-test-api]] +.Using the org.hibernate.envers.AuditReader +==== +[source, JAVA] +---- +public void testBasicUsage() { + ... + AuditReader reader = AuditReaderFactory.get( entityManager ); + Event firstRevision = reader.find( Event.class, 2L, 1 ); + ... + Event secondRevision = reader.find( Event.class, 2L, 2 ); + ... +} +---- +==== + +We see that an `org.hibernate.envers.AuditReader` is obtained from the `org.hibernate.envers.AuditReaderFactory` +which wraps the `javax.persistence.EntityManager`. + +Next, the `find` method retrieves specific revisions of the entity. The first call says to find revision number +1 of Event with id 2. The second call says to find revision number 2 of Event with id 2. + + +[[hibernate-gsg-tutorial-annotations-further]] +=== Take it further! + +.Practice Exercises +- [*] Provide a custom revision entity to additionally capture who made the changes. +- [*] Write a query to retrieve only historical data which meets some criteria. Use the _User Guide_ to see how +Envers queries are constructed. +- [*] Experiment with auditing entities which have various forms of relationships (many-to-one, many-to-many, etc). Try +retrieving historical versions (revisions) of such entities and navigating the object tree. \ No newline at end of file diff --git a/documentation/src/main/asciidoc/quickstart/guides/tutorial_jpa.adoc b/documentation/src/main/asciidoc/quickstart/guides/tutorial_jpa.adoc new file mode 100644 index 0000000000..11f49e362d --- /dev/null +++ b/documentation/src/main/asciidoc/quickstart/guides/tutorial_jpa.adoc @@ -0,0 +1,115 @@ +[[tutorial_jpa]] +== Tutorial Using the Java Persistence API (JPA) + +NOTE: This tutorial is located within the download bundle under `entitymanager/`. + +.Objectives +- [*] Bootstrap a JPA `EntityManagerFactory` +- [*] Use annotations to provide mapping information +- [*] Use JPA API calls + + +[[hibernate-gsg-tutorial-jpa-config]] +=== persistence.xml + +The previous tutorials used the Hibernate-specific `hibernate.cfg.xml` configuration file. JPA, however, defines +a different bootstrap process that uses its own configuration file named `persistence.xml`. This bootstrapping process +is defined by the JPA specification. In Java(TM) SE environments the persistence provider (Hibernate in this case) +is required to locate all JPA configuration files by classpath lookup of the `META-INF/persistence.xml` resource name. + + +[[hibernate-gsg-tutorial-jpa-config-pu]] +.persistence.xml +==== +[source, XML] +---- + + + ... + + +---- +==== + +`persistence.xml` files should provide a unique name for each "persistence unit". Applications use this name to +reference the configuration when obtaining an `javax.persistence.EntityManagerFactory reference. + +The settings defined in the `` element are discussed in <>. +Here the `javax.persistence`-prefixed varieties are used when possible. Notice that the remaining +Hibernate-specific configuration setting names are now prefixed with `hibernate.`. + +Additionally, the `` element functions the same as we saw in <>. + + +[[hibernate-gsg-tutorial-jpa-entity]] +=== The annotated entity Java class + +The entity is exactly the same as in <>. + + +[[hibernate-gsg-tutorial-jpa-test]] +=== Example code + +The previous tutorials used the Hibernate native APIs. This tutorial uses the JPA APIs. + +[[hibernate-gsg-tutorial-jpa-test-setUp]] +.Obtaining the javax.persistence.EntityManagerFactory +==== +[source, JAVA] +---- +protected void setUp() throws Exception { + entityManagerFactory = Persistence.createEntityManagerFactory( "org.hibernate.tutorial.jpa" ); +} +---- +==== + +Notice again that the persistence unit name is `org.hibernate.tutorial.jpa`, which matches <>. + + +[[hibernate-gsg-tutorial-jpa-test-saving]] +.Saving (persisting) entities +==== +[source, JAVA] +---- +EntityManager entityManager = entityManagerFactory.createEntityManager(); +entityManager.getTransaction().begin(); +entityManager.persist( new Event( "Our very first event!", new Date() ) ); +entityManager.persist( new Event( "A follow up event", new Date() ) ); +entityManager.getTransaction().commit(); +entityManager.close(); +---- +==== + +The code is similar to <>. The `javax.persistence.EntityManager` interface +is used instead of the `org.hibernate.Session` interface. JPA calls this operation "persist" instead of "save". + + +[[hibernate-gsg-tutorial-jpa-test-list]] +.Obtaining a list of entities +==== +[source, JAVA] +---- +entityManager = entityManagerFactory.createEntityManager(); +entityManager.getTransaction().begin(); +List result = entityManager.createQuery( "from Event", Event.class ).getResultList(); +for ( Event event : result ) { + System.out.println( "Event (" + event.getDate() + ") : " + event.getTitle() ); +} +entityManager.getTransaction().commit(); +entityManager.close(); +---- +==== + +Again, the code is pretty similar to what we saw in <>. + + +[[hibernate-gsg-tutorial-annotations-further]] +=== Take it further! + +.Practice Exercises +- [ ] Develop an EJB Session bean to investigate implications of using a container-managed +persistence context. Try both stateless and stateful use-cases. +- [ ] Use listeners with CDI-based injection to develop a JMS-based event message hub \ No newline at end of file diff --git a/documentation/src/main/asciidoc/quickstart/guides/tutorial_native.adoc b/documentation/src/main/asciidoc/quickstart/guides/tutorial_native.adoc new file mode 100644 index 0000000000..91b17d13e3 --- /dev/null +++ b/documentation/src/main/asciidoc/quickstart/guides/tutorial_native.adoc @@ -0,0 +1,231 @@ +[[tutorial-native]] +== Tutorial Using Native Hibernate APIs and hbm.xml Mapping + +NOTE: This tutorial is located within the download bundle under `basic/`. + +.Objectives +- [*] Bootstrap a Hibernate `SessionFactory` +- [*] Use Hibernate mapping (`hbm.xml`) files to provide mapping information +- [*] Use the Hibernate native APIs + + +[[hibernate-gsg-tutorial-basic-config]] +=== The Hibernate configuration file + +For this tutorial, the `hibernate.cfg.xml` file defines the Hibernate configuration information. + +The `connection.driver_class`, `connection.url`, `connection.username` and `connection.password` `` elements +define JDBC connection information. These tutorials utilize the H2 in-memory database, so the values of these properties +are all specific to running H2 in its in-memory mode. `connection.pool_size` is used to configure the number of +connections in Hibernate's built-in connection pool. + +IMPORTANT: The built-in Hibernate connection pool is in no way intended for production use. It lacks several +features found on production-ready connection pools. + +The `dialect` property specifies the particular SQL variant with which Hibernate will converse. + +TIP: In most cases, Hibernate is able to properly determine which dialect to use. This is particularly useful +if your application targets multiple databases. + +The `hbm2ddl.auto` property enables automatic generation of database schemas directly into the database. + +Finally, add the mapping file(s) for persistent classes to the configuration. The `resource` attribute of the +`` element causes Hibernate to attempt to locate that mapping as a classpath resource using a +`java.lang.ClassLoader` lookup. + +There are many ways and options to bootstrap a Hibernate `SessionFactory`. For additional details, see +the _Native Bootstrapping_ topical guide. + + +[[hibernate-gsg-tutorial-basic-entity]] +=== The entity Java class + +The entity class for this tutorial is `org.hibernate.tutorial.hbm.Event` + +.Notes About the Entity +* This class uses standard JavaBean naming conventions for property getter and setter methods, as well as +private visibility for the fields. Although this is the recommended design, it is not required. +* The no-argument constructor, which is also a JavaBean convention, is a requirement for all persistent classes. +Hibernate needs to create objects for you, using Java Reflection. The constructor can be private. However, package +or public visibility is required for runtime proxy generation and efficient data retrieval without bytecode +instrumentation. + + +[[hibernate-gsg-tutorial-basic-mapping]] +=== The mapping file + +The mapping file for this tutorial is the classpath resource `org/hibernate/tutorial/hbm/Event.hbm.xml` (as discussed above). + +Hibernate uses the mapping metadata to determine how to load and store objects of the persistent class. The Hibernate +mapping file is one choice for providing Hibernate with this metadata. + + +[[hibernate-gsg-tutorial-basic-mapping-class]] +.The class mapping element +==== +[source, XML] +---- + + ... + +---- +==== + +.Functions of the class mapping element +* The `name` attribute (combined here with the `package` attribute from the containing `` element) +names the FQN of the class to be defined as an entity. +* The `table` attribute names the database table which contains the data for this entity. + +Instances of the `Event` class are now mapped to rows in the `EVENTS` database table. + + +[[hibernate-gsg-tutorial-basic-mapping-id]] +.The id mapping element +==== +[source, XML] +---- + + ... + +---- +==== + +Hibernate uses the property named by the `` element to uniquely identify rows in the table. + +IMPORTANT: It is not required for the id element to map to the table's actual primary key column(s), but it is +the normal convention. Tables mapped in Hibernate do not even need to define primary keys. However, it is strongly +recommend that all schemas define proper referential integrity. Therefore id and primary key are used interchangeably +throughout Hibernate documentation. + +The `` element here names the EVENT_ID column as the primary key of the EVENTS table. It also identifies the +`id` property of the `Event` class as the property containing the identifier value. + +The `generator element informs Hibernate about which strategy is used to generated primary key values for this entity. +This example uses a simple incrementing count. + +[[hibernate-gsg-tutorial-basic-mapping-property]] +.The property mapping element +==== +[source, XML] +---- + + +---- +==== + +The two `` elements declare the remaining two persistent properties of the `Event` class: `date` and `title`. +The `date` property mapping includes the `column` attribute, but the `title` does not. +In the absence of a `column` attribute, Hibernate uses the property name as the column name. +This is appropriate for `title`, but since `date` is a reserved keyword in most databases, you need to specify a +non-reserved word for the column name. + +The `title mapping also lacks a type attribute. The types declared and used in the mapping files are neither Java data +types nor SQL database types. Instead, they are *Hibernate mapping types*, which are converters which translate between +Java and SQL data types. Hibernate attempts to determine the correct conversion and mapping type autonomously if the +type attribute is not specified in the mapping, by using Java reflection to determine the Java type of the declared +property and using a default mapping type for that Java type. + +In some cases this automatic detection might not chose the default you expect or need, as seen with the +`date` property. Hibernate cannot know if the property, which is of type `java.util.Date`, should map to a SQL +_DATE_, _TIME_, or _TIMESTAMP_ datatype. Full date and time information is preserved by mapping the property to +the _timestamp_ converter, which identifies the converter class `org.hibernate.type.TimestampType`. + +TIP: Hibernate determines the mapping type using reflection when the mapping files are processed. This process adds +overhead in terms of time and resources. If startup performance is important, consider explicitly defining the type +to use. + +[[hibernate-gsg-tutorial-basic-test]] +=== Example code + +The `org.hibernate.tutorial.hbm.NativeApiIllustrationTest` class illustrates using the Hibernate native API. + +NOTE: The examples in these tutorials are presented as JUnit tests, for ease of use. One benefit of this +approach is that `setUp` and `tearDown` roughly illustrate how a `org.hibernate.SessionFactory` is created at the +start-up of an application and closed at the end of the application lifecycle. + + +[[hibernate-gsg-tutorial-basic-test-setUp]] +.Obtaining the org.hibernate.SessionFactory +==== +[source, JAVA] +---- +protected void setUp() throws Exception { + // A SessionFactory is set up once for an application! + final StandardServiceRegistry registry = new StandardServiceRegistryBuilder() + .configure() // configures settings from hibernate.cfg.xml + .build(); + try { + sessionFactory = new MetadataSources( registry ).buildMetadata().buildSessionFactory(); + } + catch (Exception e) { + // The registry would be destroyed by the SessionFactory, but we had trouble building the SessionFactory + // so destroy it manually. + StandardServiceRegistryBuilder.destroy( registry ); + } +} +---- +==== + +The `setUp` method first builds a `org.hibernate.boot.registry.StandardServiceRegistry` instance which incorporates +configuration information into a working set of Services for use by the SessionFactory. In this tutorial +we defined all configuration information in `hibernate.cfg.xml` so there is not much interesting to see here. + +Using the `StandardServiceRegistry` we create the `org.hibernate.boot.MetadataSources` which is the start point for +telling Hibernate about your domain model. Again, since we defined that in `hibernate.cfg.xml` so there is not much +interesting to see here. + +`org.hibernate.boot.Metadata` represents the complete, partially validated view of the application domain model which the +`SessionFactory` will be based on. + +The final step in the bootstrap process is to build the `SessionFactory`. The `SessionFactory` is a +thread-safe object that is instantiated once to serve the entire application. + +The `SessionFactory` acts as a factory for `org.hibernate.Session` instances, which should be thought of +as a corollary to a "unit of work". + + +[[hibernate-gsg-tutorial-basic-test-saving]] +.Saving entities +==== +[source, JAVA] +---- +Session session = sessionFactory.openSession(); +session.beginTransaction(); +session.save( new Event( "Our very first event!", new Date() ) ); +session.save( new Event( "A follow up event", new Date() ) ); +session.getTransaction().commit(); +session.close(); +---- +==== + +`testBasicUsage()` first creates some new `Event` objects and hands them over to Hibernate for management, using the +`save()` method. Hibernate now takes responsibility to perform an _INSERT_ on the database for each `Event`. + + +[[hibernate-gsg-tutorial-basic-test-list]] +.Obtaining a list of entities +==== +[source, JAVA] +---- +session = sessionFactory.openSession(); +session.beginTransaction(); +List result = session.createQuery( "from Event" ).list(); +for ( Event event : (List) result ) { + System.out.println( "Event (" + event.getDate() + ") : " + event.getTitle() ); +} +session.getTransaction().commit(); +session.close(); +---- +==== + +Here we see an example of the Hibernate Query Language (HQL) to load all existing `Event` objects from the database +by generating the appropriate _SELECT_ SQL, sending it to the database and populating `Event` objects with the result +set data. + + +[[hibernate-gsg-tutorial-annotations-further]] +=== Take it further! + +.Practice Exercises +- [ ] Reconfigure the examples to connect to your own persistent relational database. +- [ ] Add an association to the `Event` entity to model a message thread. \ No newline at end of file diff --git a/documentation/src/main/asciidoc/quickstart/guides/tutorial_osgi.adoc b/documentation/src/main/asciidoc/quickstart/guides/tutorial_osgi.adoc new file mode 100644 index 0000000000..2d917fca95 --- /dev/null +++ b/documentation/src/main/asciidoc/quickstart/guides/tutorial_osgi.adoc @@ -0,0 +1,17 @@ +[[tutorial_osgi]] +== OSGi Tutorial + +[IMPORTANT] +==== +This guide and the tutorials were very much out-of-date as of 5.0, and were therefore removed until they can be updated. +For details see link:$$https://hibernate.atlassian.net/browse/HHH-9919$$[HHH-9919]. + +In the meantime, we suggest looking at the Pax Exam and Karaf based +link:$$https://github.com/hibernate/hibernate-orm/blob/master/hibernate-osgi/src/test/java/org/hibernate/osgi/test/OsgiIntegrationTest.java$$[hibernate-osgi tests] +for examples of using Hibernate in Karaf specifically. Usage in other OSGi containers should be similar. + +The Hibernate-produced Karaf features file (feature repository) is published to the JBoss Nexus repository, along +with our other artifacts, using the `org.hibernate` groupId and `hibernate-osgi` with the `karaf` classifier. The +features it defines are versioned using the same version as the release it comes from. The Karaf feature file is +tested against Karaf version 3.0.3. +==== diff --git a/documentation/src/main/docbook/quickstart/tutorials/annotations/pom.xml b/documentation/src/main/asciidoc/quickstart/tutorials/annotations/pom.xml similarity index 100% rename from documentation/src/main/docbook/quickstart/tutorials/annotations/pom.xml rename to documentation/src/main/asciidoc/quickstart/tutorials/annotations/pom.xml diff --git a/documentation/src/main/docbook/quickstart/tutorials/annotations/src/test/java/org/hibernate/tutorial/annotations/AnnotationsIllustrationTest.java b/documentation/src/main/asciidoc/quickstart/tutorials/annotations/src/test/java/org/hibernate/tutorial/annotations/AnnotationsIllustrationTest.java similarity index 78% rename from documentation/src/main/docbook/quickstart/tutorials/annotations/src/test/java/org/hibernate/tutorial/annotations/AnnotationsIllustrationTest.java rename to documentation/src/main/asciidoc/quickstart/tutorials/annotations/src/test/java/org/hibernate/tutorial/annotations/AnnotationsIllustrationTest.java index c1131d23f5..33e28629a9 100644 --- a/documentation/src/main/docbook/quickstart/tutorials/annotations/src/test/java/org/hibernate/tutorial/annotations/AnnotationsIllustrationTest.java +++ b/documentation/src/main/asciidoc/quickstart/tutorials/annotations/src/test/java/org/hibernate/tutorial/annotations/AnnotationsIllustrationTest.java @@ -26,11 +26,13 @@ package org.hibernate.tutorial.annotations; import java.util.Date; import java.util.List; -import junit.framework.TestCase; - import org.hibernate.Session; import org.hibernate.SessionFactory; -import org.hibernate.cfg.Configuration; +import org.hibernate.boot.MetadataSources; +import org.hibernate.boot.registry.StandardServiceRegistry; +import org.hibernate.boot.registry.StandardServiceRegistryBuilder; + +import junit.framework.TestCase; /** * Illustrates the use of Hibernate native APIs. The code here is unchanged from the {@code basic} example, the @@ -43,10 +45,18 @@ public class AnnotationsIllustrationTest extends TestCase { @Override protected void setUp() throws Exception { - // A SessionFactory is set up once for an application - sessionFactory = new Configuration() - .configure() // configures settings from hibernate.cfg.xml - .buildSessionFactory(); + // A SessionFactory is set up once for an application! + final StandardServiceRegistry registry = new StandardServiceRegistryBuilder() + .configure() // configures settings from hibernate.cfg.xml + .build(); + try { + sessionFactory = new MetadataSources( registry ).buildMetadata().buildSessionFactory(); + } + catch (Exception e) { + // The registry would be destroyed by the SessionFactory, but we had trouble building the SessionFactory + // so destroy it manually. + StandardServiceRegistryBuilder.destroy( registry ); + } } @Override diff --git a/documentation/src/main/docbook/quickstart/tutorials/annotations/src/test/java/org/hibernate/tutorial/annotations/Event.java b/documentation/src/main/asciidoc/quickstart/tutorials/annotations/src/test/java/org/hibernate/tutorial/annotations/Event.java similarity index 100% rename from documentation/src/main/docbook/quickstart/tutorials/annotations/src/test/java/org/hibernate/tutorial/annotations/Event.java rename to documentation/src/main/asciidoc/quickstart/tutorials/annotations/src/test/java/org/hibernate/tutorial/annotations/Event.java diff --git a/documentation/src/main/docbook/quickstart/tutorials/annotations/src/test/resources/hibernate.cfg.xml b/documentation/src/main/asciidoc/quickstart/tutorials/annotations/src/test/resources/hibernate.cfg.xml similarity index 100% rename from documentation/src/main/docbook/quickstart/tutorials/annotations/src/test/resources/hibernate.cfg.xml rename to documentation/src/main/asciidoc/quickstart/tutorials/annotations/src/test/resources/hibernate.cfg.xml diff --git a/documentation/src/main/docbook/quickstart/tutorials/basic/pom.xml b/documentation/src/main/asciidoc/quickstart/tutorials/basic/pom.xml similarity index 100% rename from documentation/src/main/docbook/quickstart/tutorials/basic/pom.xml rename to documentation/src/main/asciidoc/quickstart/tutorials/basic/pom.xml diff --git a/documentation/src/main/docbook/quickstart/tutorials/basic/src/test/java/org/hibernate/tutorial/hbm/Event.hbm.xml b/documentation/src/main/asciidoc/quickstart/tutorials/basic/src/test/java/org/hibernate/tutorial/hbm/Event.hbm.xml similarity index 100% rename from documentation/src/main/docbook/quickstart/tutorials/basic/src/test/java/org/hibernate/tutorial/hbm/Event.hbm.xml rename to documentation/src/main/asciidoc/quickstart/tutorials/basic/src/test/java/org/hibernate/tutorial/hbm/Event.hbm.xml diff --git a/documentation/src/main/docbook/quickstart/tutorials/basic/src/test/java/org/hibernate/tutorial/hbm/Event.java b/documentation/src/main/asciidoc/quickstart/tutorials/basic/src/test/java/org/hibernate/tutorial/hbm/Event.java similarity index 100% rename from documentation/src/main/docbook/quickstart/tutorials/basic/src/test/java/org/hibernate/tutorial/hbm/Event.java rename to documentation/src/main/asciidoc/quickstart/tutorials/basic/src/test/java/org/hibernate/tutorial/hbm/Event.java diff --git a/documentation/src/main/docbook/quickstart/tutorials/basic/src/test/java/org/hibernate/tutorial/hbm/NativeApiIllustrationTest.java b/documentation/src/main/asciidoc/quickstart/tutorials/basic/src/test/java/org/hibernate/tutorial/hbm/NativeApiIllustrationTest.java similarity index 75% rename from documentation/src/main/docbook/quickstart/tutorials/basic/src/test/java/org/hibernate/tutorial/hbm/NativeApiIllustrationTest.java rename to documentation/src/main/asciidoc/quickstart/tutorials/basic/src/test/java/org/hibernate/tutorial/hbm/NativeApiIllustrationTest.java index c714f7067f..a1e327e199 100644 --- a/documentation/src/main/docbook/quickstart/tutorials/basic/src/test/java/org/hibernate/tutorial/hbm/NativeApiIllustrationTest.java +++ b/documentation/src/main/asciidoc/quickstart/tutorials/basic/src/test/java/org/hibernate/tutorial/hbm/NativeApiIllustrationTest.java @@ -26,11 +26,13 @@ package org.hibernate.tutorial.hbm; import java.util.Date; import java.util.List; -import junit.framework.TestCase; - import org.hibernate.Session; import org.hibernate.SessionFactory; -import org.hibernate.cfg.Configuration; +import org.hibernate.boot.MetadataSources; +import org.hibernate.boot.registry.StandardServiceRegistry; +import org.hibernate.boot.registry.StandardServiceRegistryBuilder; + +import junit.framework.TestCase; /** * Illustrates use of Hibernate native APIs. @@ -42,10 +44,18 @@ public class NativeApiIllustrationTest extends TestCase { @Override protected void setUp() throws Exception { - // A SessionFactory is set up once for an application - sessionFactory = new Configuration() - .configure() // configures settings from hibernate.cfg.xml - .buildSessionFactory(); + // A SessionFactory is set up once for an application! + final StandardServiceRegistry registry = new StandardServiceRegistryBuilder() + .configure() // configures settings from hibernate.cfg.xml + .build(); + try { + sessionFactory = new MetadataSources( registry ).buildMetadata().buildSessionFactory(); + } + catch (Exception e) { + // The registry would be destroyed by the SessionFactory, but we had trouble building the SessionFactory + // so destroy it manually. + StandardServiceRegistryBuilder.destroy( registry ); + } } @Override @@ -55,6 +65,7 @@ public class NativeApiIllustrationTest extends TestCase { } } + @SuppressWarnings("unchecked") public void testBasicUsage() { // create a couple of events... Session session = sessionFactory.openSession(); diff --git a/documentation/src/main/docbook/quickstart/tutorials/basic/src/test/resources/hibernate.cfg.xml b/documentation/src/main/asciidoc/quickstart/tutorials/basic/src/test/resources/hibernate.cfg.xml similarity index 100% rename from documentation/src/main/docbook/quickstart/tutorials/basic/src/test/resources/hibernate.cfg.xml rename to documentation/src/main/asciidoc/quickstart/tutorials/basic/src/test/resources/hibernate.cfg.xml diff --git a/documentation/src/main/docbook/quickstart/tutorials/entitymanager/pom.xml b/documentation/src/main/asciidoc/quickstart/tutorials/entitymanager/pom.xml similarity index 100% rename from documentation/src/main/docbook/quickstart/tutorials/entitymanager/pom.xml rename to documentation/src/main/asciidoc/quickstart/tutorials/entitymanager/pom.xml diff --git a/documentation/src/main/docbook/quickstart/tutorials/entitymanager/src/test/java/org/hibernate/tutorial/em/EntityManagerIllustrationTest.java b/documentation/src/main/asciidoc/quickstart/tutorials/entitymanager/src/test/java/org/hibernate/tutorial/em/EntityManagerIllustrationTest.java similarity index 100% rename from documentation/src/main/docbook/quickstart/tutorials/entitymanager/src/test/java/org/hibernate/tutorial/em/EntityManagerIllustrationTest.java rename to documentation/src/main/asciidoc/quickstart/tutorials/entitymanager/src/test/java/org/hibernate/tutorial/em/EntityManagerIllustrationTest.java diff --git a/documentation/src/main/docbook/quickstart/tutorials/entitymanager/src/test/java/org/hibernate/tutorial/em/Event.java b/documentation/src/main/asciidoc/quickstart/tutorials/entitymanager/src/test/java/org/hibernate/tutorial/em/Event.java similarity index 100% rename from documentation/src/main/docbook/quickstart/tutorials/entitymanager/src/test/java/org/hibernate/tutorial/em/Event.java rename to documentation/src/main/asciidoc/quickstart/tutorials/entitymanager/src/test/java/org/hibernate/tutorial/em/Event.java diff --git a/documentation/src/main/docbook/quickstart/tutorials/entitymanager/src/test/resources/META-INF/persistence.xml b/documentation/src/main/asciidoc/quickstart/tutorials/entitymanager/src/test/resources/META-INF/persistence.xml similarity index 100% rename from documentation/src/main/docbook/quickstart/tutorials/entitymanager/src/test/resources/META-INF/persistence.xml rename to documentation/src/main/asciidoc/quickstart/tutorials/entitymanager/src/test/resources/META-INF/persistence.xml diff --git a/documentation/src/main/docbook/quickstart/tutorials/envers/pom.xml b/documentation/src/main/asciidoc/quickstart/tutorials/envers/pom.xml similarity index 100% rename from documentation/src/main/docbook/quickstart/tutorials/envers/pom.xml rename to documentation/src/main/asciidoc/quickstart/tutorials/envers/pom.xml diff --git a/documentation/src/main/docbook/quickstart/tutorials/envers/src/test/java/org/hibernate/tutorial/envers/EnversIllustrationTest.java b/documentation/src/main/asciidoc/quickstart/tutorials/envers/src/test/java/org/hibernate/tutorial/envers/EnversIllustrationTest.java similarity index 100% rename from documentation/src/main/docbook/quickstart/tutorials/envers/src/test/java/org/hibernate/tutorial/envers/EnversIllustrationTest.java rename to documentation/src/main/asciidoc/quickstart/tutorials/envers/src/test/java/org/hibernate/tutorial/envers/EnversIllustrationTest.java diff --git a/documentation/src/main/docbook/quickstart/tutorials/envers/src/test/java/org/hibernate/tutorial/envers/Event.java b/documentation/src/main/asciidoc/quickstart/tutorials/envers/src/test/java/org/hibernate/tutorial/envers/Event.java similarity index 100% rename from documentation/src/main/docbook/quickstart/tutorials/envers/src/test/java/org/hibernate/tutorial/envers/Event.java rename to documentation/src/main/asciidoc/quickstart/tutorials/envers/src/test/java/org/hibernate/tutorial/envers/Event.java diff --git a/documentation/src/main/docbook/quickstart/tutorials/envers/src/test/resources/META-INF/persistence.xml b/documentation/src/main/asciidoc/quickstart/tutorials/envers/src/test/resources/META-INF/persistence.xml similarity index 100% rename from documentation/src/main/docbook/quickstart/tutorials/envers/src/test/resources/META-INF/persistence.xml rename to documentation/src/main/asciidoc/quickstart/tutorials/envers/src/test/resources/META-INF/persistence.xml diff --git a/documentation/src/main/docbook/quickstart/tutorials/pom.xml b/documentation/src/main/asciidoc/quickstart/tutorials/pom.xml similarity index 100% rename from documentation/src/main/docbook/quickstart/tutorials/pom.xml rename to documentation/src/main/asciidoc/quickstart/tutorials/pom.xml diff --git a/documentation/src/main/asciidoc/topical/sessionfactory/CustomSessionFactory.adoc b/documentation/src/main/asciidoc/topical/sessionfactory/CustomSessionFactory.adoc index b2a795d866..b87c33ea6a 100644 --- a/documentation/src/main/asciidoc/topical/sessionfactory/CustomSessionFactory.adoc +++ b/documentation/src/main/asciidoc/topical/sessionfactory/CustomSessionFactory.adoc @@ -8,7 +8,7 @@ specific to the custom implementation. The second way is to integrate with the This guide will cover the second approach. -=== Implementor contracts +== Implementor contracts A Hibernate naming convention is that SPI contracts extending API contracts are named with Implementor appended to the API contract name. For `SessionFactory` and `Session` that is `SessionFactoryImplementor` and @@ -18,7 +18,7 @@ implement `org.hibernate.engine.spi.SessionFactoryImplementor` and `org.hibernat See all pertinent JavaDocs for discussions of implementation details. -=== Integration hooks +== Integration hooks `org.hibernate.boot.SessionFactoryBuilder` is part of the Hibernate native bootstrap API where we want to configure the `SessionFactory` to be built. Third parties can hook into this process by supplying a diff --git a/documentation/src/main/docbook/quickstart/en-US/Author_Group.xml b/documentation/src/main/docbook/quickstart/en-US/Author_Group.xml deleted file mode 100644 index 555f11bc9b..0000000000 --- a/documentation/src/main/docbook/quickstart/en-US/Author_Group.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - Gavin - King - - - - - Christian - Bauer - - - - - Steve - Ebersole - - - - - Emmanuel - Bernard - - - - - Adam - Warski - - - - - Brett - Meyer - - - - - - James - Cobb - - - Graphic Design - - - - - - Cheyenne - Weaver - - - Graphic Design - - - - diff --git a/documentation/src/main/docbook/quickstart/en-US/Hibernate_Getting_Started_Guide.ent b/documentation/src/main/docbook/quickstart/en-US/Hibernate_Getting_Started_Guide.ent deleted file mode 100644 index db53b9bea5..0000000000 --- a/documentation/src/main/docbook/quickstart/en-US/Hibernate_Getting_Started_Guide.ent +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/documentation/src/main/docbook/quickstart/en-US/Hibernate_Getting_Started_Guide.xml b/documentation/src/main/docbook/quickstart/en-US/Hibernate_Getting_Started_Guide.xml deleted file mode 100644 index f5d41278c5..0000000000 --- a/documentation/src/main/docbook/quickstart/en-US/Hibernate_Getting_Started_Guide.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - -%BOOK_ENTITIES; -]> - - - - Hibernate Getting Started Guide - &version; - 1.0 - JBoss Hibernate Core - &version; - &today; - 1 - - - - - - - - - - ©rightYear; - ©rightHolder; - - - - The Hibernate Team - - - The JBoss Visual Design Team - - - - - - - - - - - - - - - diff --git a/documentation/src/main/docbook/quickstart/en-US/content/obtaining.xml b/documentation/src/main/docbook/quickstart/en-US/content/obtaining.xml deleted file mode 100644 index 9bb0083868..0000000000 --- a/documentation/src/main/docbook/quickstart/en-US/content/obtaining.xml +++ /dev/null @@ -1,187 +0,0 @@ - - - - - Obtaining Hibernate - -
- Release Bundle Downloads - - The Hibernate team provides release bundles hosted on the SourceForge File Release System, in - ZIP - and - TGZ - formats. Each release bundle containsJARs, - documentation, source code, and other goodness. - - - You can download releases of Hibernate, in your chosen format, from the list at - . - - - - - The lib/required/ directory contains all the JARs Hibernate requires. All the - jars in this directory must also be included in your project's classpath. - - - - - The /lib/jpa/ directory contains the - hibernate-entitymanager jar and its dependencies beyond those - in lib/required/. This defines Hibernate support for - JPA. - - - - - The lib/envers directory contains the hibernate-envers - jar and its dependencies beyond those in lib/required/ - - - - - The lib/optional directory contains the jars needed for optional features of - Hibernate. - - - -
- -
- Maven Repository Artifacts - - - The authoritative repository for Hibernate artifacts is the JBoss Maven repository. The team responsible - for the JBoss Maven repository maintains a number of Wiki pages that contain important information. - - - Maven Repository Wiki Pages - - - - General information about the repository. - - - - - - Information about setting up the JBoss - repositories in order to do development work on JBoss projects themselves. - - - - - - Information about setting up access to - the repository to use JBoss projects as part of your own software. - - - - - - - Hibernate produces a number of artifacts (all under the org.hibernate groupId): - - - Hibernate Artifacts under groupId <systemitem>org.hibernate</systemitem> - - - hibernate-core - - - The main artifact, needed to build applications using the native Hibernate APIs including - defining metadata in both annotations as well as Hibernate's own hbm.xml - format. - - - - - hibernate-entitymanager - - - Represents Hibernate's implementation of JPA, as specified at - . - - - This artifact depends on hibernate-core - - - - - hibernate-envers - - - An optional module that provides historical auditing of changes to your entities. - - - This artifact depends on both hibernate-core - and hibernate-entitymanager. - - - - - hibernate-c3p0 - - - Provides integration between Hibernate and the C3P0 connection - pool library. See for information - about C3P0. - - - This artifact depends on hibernate-core, but is generally included - in a project as a runtime dependency. It pulls in the C3P0 - dependencies automatically. - - - - - hibernate-proxool - - - Provides integration between Hibernate and the Proxool connection - pool library. See for more information about - this library. - - - This artifact depends on hibernate-core, but is generally included - in a project as a runtime dependency. It pulls in the Proxool - dependencies automatically.. - - - - - hibernate-ehcache - - - Privides integration between Hibernate and EhCache, as a - second-level cache. See for more - information aboutEhCache. - - - This artifact depends on hibernate-core, but is generally included - in a project as a runtime dependency. It pulls in the Ehcache - dependencies automatically. - - - - - hibernate-infinispan - - - Provides integration between Hibernate and Infinispan, as a - second-level cache. See for more information - about Infinispan. - - - This artifact depends on hibernate-core, but is generally included - in a project as a runtime dependency. It pulls in the Infinispan - dependencies automatically. - - - - -
-
\ No newline at end of file diff --git a/documentation/src/main/docbook/quickstart/en-US/content/preface.xml b/documentation/src/main/docbook/quickstart/en-US/content/preface.xml deleted file mode 100644 index 6a417a23d7..0000000000 --- a/documentation/src/main/docbook/quickstart/en-US/content/preface.xml +++ /dev/null @@ -1,103 +0,0 @@ - - - - - Preface - - - Working with both Object-Oriented software and Relational Databases can be cumbersome and time consuming. - Development costs are significantly higher due to a paradigm mismatch between how data is represented in objects - versus relational databases. Hibernate is an Object/Relational Mapping solution for Java environments. The - term Object/Relational Mapping refers to the technique of mapping data between an object model representation to - a relational data model representation. See - for a good high-level discussion. - - - - - You do not need a strong background in SQL to use Hibernate, but having a basic understanding of the - concepts can help you understand Hibernate more fully and quickly. An understanding of data modeling - principles is especially important. You might want to consider these resources as a good starting point: - - - Data Modeling Resources - - - - - - - - - - - - - - - Hibernate takes care of the mapping from Java classes to database tables, and from Java data types to SQL data - types. In addition, it provides data query and retrieval facilities. It can significantly reduce development - time otherwise spent with manual data handling in SQL and JDBC. Hibernate’s design goal is to relieve the - developer from 95% of common data persistence-related programming tasks by eliminating the need for manual, - hand-crafted data processing using SQL and JDBC. However, unlike many other persistence solutions, Hibernate - does not hide the power of SQL from you and guarantees that your investment in relational technology and - knowledge is as valid as always. - - - - Hibernate may not be the best solution for data-centric applications that only use stored-procedures to - implement the business logic in the database, it is most useful with object-oriented domain models and business - logic in the Java-based middle-tier. However, Hibernate can certainly help you to remove or encapsulate - vendor-specific SQL code and streamlines the common task of translating result sets from a tabular - representation to a graph of objects. - - -
- Get Involved - - - - Use Hibernate and report any bugs or issues you find. See - for details. - - - - - Try your hand at fixing some bugs or implementing enhancements. Again, see - . - - - - - Engage with the community using mailing lists, forums, IRC, or other ways listed at - . - - - - - Help improve or translate this documentation. Contact us on - the developer mailing list if you have interest. - - - - - Spread the word. Let the rest of your organization know about the benefits of - Hibernate. - - - -
- -
- Tutorial code - - The referenced projects and code for the tutorials in this guide are available at - . - -
-
diff --git a/documentation/src/main/docbook/quickstart/en-US/content/tutorial_annotations.xml b/documentation/src/main/docbook/quickstart/en-US/content/tutorial_annotations.xml deleted file mode 100644 index 06dee7b1cd..0000000000 --- a/documentation/src/main/docbook/quickstart/en-US/content/tutorial_annotations.xml +++ /dev/null @@ -1,133 +0,0 @@ - - - - - Tutorial Using Native Hibernate APIs and Annotation Mappings - - - This tutorial is located within the download bundle under annotations. - - - Objectives - - - Use annotations to provide mapping information - - - - - Use the native Hibernate APIs - - - - - -
- The Hibernate configuration file - - - The contents are identical to , with one important - difference. The mapping element at the very end naming the annotated entity class using - the attribute. - -
- -
- The annotated entity Java class - - The entity class in this tutorial is org.hibernate.tutorial.annotations.Event which - follows JavaBean conventions. In fact the class itself is identical to the one in , except that annotations are used to provide the metadata, - rather than a separate hbm.xml file. - - - - Identifying the class as an entity - @Entity -@Table( name = "EVENTS" ) -public class Event { - ... -} - - - - - The @javax.persistence.Entity annotation is used to mark a class as an entity. - It functions the same as the class mapping element discussed in . Additionally the - @javax.persistence.Table annotation explicitly specifies the table - name. Without this specification, the default table name would be EVENT). - - - - Identifying the identifier property - @Id -@GeneratedValue(generator="increment") -@GenericGenerator(name="increment", strategy = "increment") -public Long getId() { - return id; -} - - - - @javax.persistence.Id marks the property which defines the - entity's identifier. @javax.persistence.GeneratedValue and - @org.hibernate.annotations.GenericGenerator work in tandem - to indicate that Hibernate should use Hibernate's increment generation - strategy for this entity's identifier values. - - - - Identifying basic properties - public String getTitle() { - return title; -} - -@Temporal(TemporalType.TIMESTAMP) -@Column(name = "EVENT_DATE") -public Date getDate() { - return date; -} - - - - As in , the date property needs - special handling to account for its special naming and its SQL type. - -
- -
- Example code - - org.hibernate.tutorial.annotations.AnnotationsIllustrationTest is essentially the - same as org.hibernate.tutorial.hbm.NativeApiIllustrationTest discussed in - . - -
- -
- Take it further! - - Practice Exercises - - - Add an association to the Event entity to model a message thread. Use the - Developer Guide as a guide. - - - - - Add a callback to receive notifications when an Event is created, updated or - deleted. Try the same with an event listener. Use the Developer - Guide as a guide. - - - -
- -
\ No newline at end of file diff --git a/documentation/src/main/docbook/quickstart/en-US/content/tutorial_envers.xml b/documentation/src/main/docbook/quickstart/en-US/content/tutorial_envers.xml deleted file mode 100644 index 3cb3b1930c..0000000000 --- a/documentation/src/main/docbook/quickstart/en-US/content/tutorial_envers.xml +++ /dev/null @@ -1,107 +0,0 @@ - - - - - Tutorial Using Envers - - - This tutorial is located within the download bundle under envers. - - - Objectives - - - Configure Envers. - - - - - Use the Envers APIs to view and analyze historical data. - - - - -
- <filename>persistence.xml</filename> - - This file was discussed in the JPA tutorial in , and is essentially the same here. - -
- -
- The annotated entity Java class - - Again, the entity is largely the same as in . The major - difference is the addition of the @org.hibernate.envers.Audited annotation, which - tells Envers to automatically track changes to this entity. - -
- -
- Example code - - Again, this tutorial makes use of the JPA APIs. However, the code also makes a change to one - of the entities, then uses the Envers API to pull back the initial revision as well as the updated - revision. A revision refers to a version of an entity. - - - Using the <interfacename>org.hibernate.envers.AuditReader</interfacename> - public void testBasicUsage() { - ... - AuditReader reader = AuditReaderFactory.get( entityManager ); - Event firstRevision = reader.find( Event.class, 2L, 1 ); - ... - Event secondRevision = reader.find( Event.class, 2L, 2 ); - ... -} - - - Description of Example - - - An org.hibernate.envers.AuditReader is obtained from the - org.hibernate.envers.AuditReaderFactory which wraps the - javax.persistence.EntityManager. - - - - - Next, the find method retrieves specific revisions of the entity. The first call - reads find revision number 1 of Event with id 2. The second call reads find - revision number 2 of Event with id 2. - - - -
- -
- Take it further! - - Practice Exercises - - - Provide a custom revision entity to additionally capture who made the changes. - - - - - Write a query to retrieve only historical data which meets some criteria. Use the - Envers User Guide to see how Envers queries are constructed. - - - - - Experiment with auditing entities which have many-to-one, many-to-many relations as well as collections. - Try retrieving historical versions (revisions) of such entities and navigating the object tree. - - - -
- -
\ No newline at end of file diff --git a/documentation/src/main/docbook/quickstart/en-US/content/tutorial_jpa.xml b/documentation/src/main/docbook/quickstart/en-US/content/tutorial_jpa.xml deleted file mode 100644 index 597ca02ad5..0000000000 --- a/documentation/src/main/docbook/quickstart/en-US/content/tutorial_jpa.xml +++ /dev/null @@ -1,145 +0,0 @@ - - - - - Tutorial Using the <firstterm><phrase>Java Persistence API (JPA)</phrase></firstterm> - - - This tutorial is located within the download bundle under entitymanager. - - - Objectives - - - Use annotations to provide mapping information. - - - - - Use JPA. - - - - -
- <filename>persistence.xml</filename> - - - The previous tutorials used the Hibernate-specific - hibernate.cfg.xml configuration file. - JPA, however, defines a different bootstrap process that uses its own configuration - file named persistence.xml. This bootstrapping process is defined by the - JPA specification. In Java SE environments the persistence - provider (Hibernate in this case) is required to locate all JPA configuration files - by classpath lookup of the META-INF/persistence.xml resource name. - - - - <filename>persistence.xml</filename> - - - ... - -]]> - - - - persistence.xml files should provide a unique name for each persistence - unit. Applications use this name to reference the configuration when obtaining an - javax.persistence.EntityManagerFactory reference. - - - - The settings defined in the properties element are discussed in . Here the javax.persistence-prefixed - varieties are used when possible. Notice that the remaining Hibernate-specific configuration setting names - are now prefixed with hibernate.. - - - - Additionally, the class element functions the same as in . - -
- -
- The annotated entity Java class - - The entity is exactly the same as in - -
- -
- Example code - - The previous tutorials used the Hibernate APIs. This tutorial uses the JPA APIs. - - - - Obtaining the <interfacename>javax.persistence.EntityManagerFactory</interfacename> - protected void setUp() throws Exception { - entityManagerFactory = Persistence.createEntityManagerFactory( "org.hibernate.tutorial.jpa" ); -} - - - - Notice again that the persistence unit name is org.hibernate.tutorial.jpa, which matches - - - - - Saving (persisting) entities - EntityManager entityManager = entityManagerFactory.createEntityManager(); -entityManager.getTransaction().begin(); -entityManager.persist( new Event( "Our very first event!", new Date() ) ); -entityManager.persist( new Event( "A follow up event", new Date() ) ); -entityManager.getTransaction().commit(); -entityManager.close(); - - - - The code is similar to . An - javax.persistence.EntityManager interface is used instead of a - org.hibernate.Session interface. JPA calls this - operation persist instead of save. - - - - Obtaining a list of entities - result = entityManager.createQuery( "from Event", Event.class ).getResultList(); -for ( Event event : result ) { - System.out.println( "Event (" + event.getDate() + ") : " + event.getTitle() ); -} -entityManager.getTransaction().commit(); -entityManager.close();]]> - - - - Again, the code is pretty similar to . - -
- -
- Take it further! - - Practice Exercises - - - Develop an EJB Session bean to investigate implications of using a container-managed - persistence context (javax.persistence.EntityManager). Try both - stateless and stateful use-cases. - - - -
-
\ No newline at end of file diff --git a/documentation/src/main/docbook/quickstart/en-US/content/tutorial_native.xml b/documentation/src/main/docbook/quickstart/en-US/content/tutorial_native.xml deleted file mode 100644 index 231c911c14..0000000000 --- a/documentation/src/main/docbook/quickstart/en-US/content/tutorial_native.xml +++ /dev/null @@ -1,342 +0,0 @@ - - - - - Tutorial Using Native Hibernate APIs and <phrase>hbm.xml</phrase> Mappings - - - This tutorial is located within the download bundle under basic/. - - - Objectives - - - using Hibernate mapping files (hbm.xml) to provide mapping information - - - - - using the native Hibernate APIs - - - - - -
- The Hibernate configuration file - - - The resource file hibernate.cfg.xml defines Hibernate configuration - information. - - - - The connection.driver_class, connection.url, - connection.username and connection.password - property elements define JDBC connection information. These tutorials utilize the H2 - in-memory database, So the values of these properties are all specific to running H2 in its in-memory mode. - connection.pool_size is used to configure the number of connections in Hibernate's - built-in connection pool. - - - - - The built-in Hibernate connection pool is in no way intended for production use. It lacks several - features found on production-ready connection pools. See the section discussion in Hibernate Developer Guide for further information. - - - - - The dialect property specifies the particular SQL variant with which Hibernate will - converse. - - - - - In most cases, Hibernate is able to properly determine which dialect to use. This is particularly useful - if your application targets multiple databases. This is discussed in detail in the Hibernate Developer Guide - - - - - The hbm2ddl.auto property enables automatic generation of database schemas directly into - the database. - - - - Finally, add the mapping file(s) for persistent classes to the configuration. The - attribute of the mapping element causes Hibernate to attempt to locate that mapping as a - classpath resource, using a java.lang.ClassLoader lookup. - - -
- - -
- The entity Java class - - The entity class for this tutorial is org.hibernate.tutorial.hbm.Event. - - - Notes About the Entity - - - This class uses standard JavaBean naming conventions for property getter and setter methods, as well as - private visibility for the fields. Although this is the recommended design, it is not required. - - - - - The no-argument constructor, which is also a JavaBean convention, is a - requirement for all persistent classes. Hibernate needs to create objects for you, using Java - Reflection. The constructor can be private. However, package or public visibility is required for runtime - proxy generation and efficient data retrieval without bytecode instrumentation. - - - -
- - -
- The mapping file - - The hbm.xml mapping file for this tutorial is the classpath resource - org/hibernate/tutorial/hbm/Event.hbm.xml as we saw in - - - - - Hibernate uses the mapping metadata to determine how to load and store objects of the persistent class. The - Hibernate mapping file is one choice for providing Hibernate with this metadata. - - - - The <literal>class</literal> mapping element - - ... -]]> - - - - Functions of the <varname>class</varname> mapping element - - - The attribute (combined here with the attribute from - the containing hibernate-mapping element) names the FQN of the class to be - defined as an entity. - - - - - The attribute names the database table which contains the data for this - entity. - - - - - - Instances of the Event class are now mapped to rows in the - EVENTS table. - - - - The <literal>id</literal> mapping element - - ... -]]> - - - - Hibernate uses the property named by the id element to uniquely identify rows in the - table. - - - - - - It is not required for the id element to map to the table's actual primary key - column(s), but it is the normal convention. Tables mapped in Hibernate do not even need to define - primary keys. However, it is strongly recommend that all schemas define proper referential - integrity. Therefore id and primary key are used interchangeably - throughout Hibernate documentation. - - - - The id element here identifies the EVENT_ID column as - the primary key of the EVENTS table. It also identifies the - id property of the Event class as the property containing the - identifier value. - - - The generator element nested inside the id element informs Hibernate - about which strategy is used to generated primary key values for this entity. This example uses a simple - incrementing count. - - - - The <literal>property</literal> mapping element - -]]> - - - - The two property elements declare the remaining two properties of the - Event class: date and title. The - date property mapping includes the attribute, but the - title does not. In the absence of a attribute, Hibernate - uses the property name as the column name. This is appropriate for title, but since - date is a reserved keyword in most databases, you need to specify a non-reserved - word for the column name. - - - The title mapping also lacks a attribute. The types - declared and used in the mapping files are neither Java data types nor SQL database types. Instead, - they are Hibernate mapping types. Hibernate mapping types are - converters which translate between Java and SQL data types. Hibernate attempts to determine the correct - conversion and mapping type autonomously if the attribute is not present in the - mapping, by using Java reflection to determine the Java type of the declared property and using a - default mapping type for that Java type. - - - In some cases this automatic detection might not chose the default you expect or need, as seen with the - date property. Hibernate cannot know if the property, which is of type - java.util.Date, should map to a SQL DATE, - TIME, or TIMESTAMP datatype. - Full date and time information is preserved by mapping the property to a timestamp converter, - which identifies an instance of the class org.hibernate.type.TimestampType. - - - - - - Hibernate determines the mapping type using reflection when the mapping files are processed. This - process adds overhead in terms of time and resources. If startup performance is important, consider - explicitly defining the type to use. - - - -
- -
- Example code - - The org.hibernate.tutorial.hbm.NativeApiIllustrationTest class illustrates using - the Hibernate native API. - - - - The examples in these tutorials are presented as JUnit tests, for ease of use. One benefit of this - approach is that setUp and tearDown roughly illustrate - how a org.hibernate.SessionFactory is created at the start-up of an - application and closed at the end of the application lifecycle. - - - - - Obtaining the <interfacename>org.hibernate.SessionFactory</interfacename> - protected void setUp() throws Exception { - // A SessionFactory is set up once for an application - sessionFactory = new Configuration() - .configure() // configures settings from hibernate.cfg.xml - .buildSessionFactory(); -} - - - - Tutorial Workflow - - The configuration is loaded. - - The org.hibernate.cfg.Configuration class is the first thing to notice. In this - tutorial, all configuration details are located in the hibernate.cfg.xml file - discussed in . - - - - The <interfacename>org.hibernate.SessionFactory</interfacename> is created. - - The org.hibernate.cfg.Configuration then creates the - org.hibernate.SessionFactory which is a thread-safe object that is - instantiated once to serve the entire application. - - - - <interfacename>SessionFactory</interfacename> creates <classname>Session</classname> instances. - - The org.hibernate.SessionFactory acts as a factory for - org.hibernate.Session instances as can be seen in the - testBasicUsage method. - - - - - <classname>Session</classname>s perform work. - - A org.hibernate.Session should be thought of as a corollary to a "unit of - work". - - - - - - Saving entities - Session session = sessionFactory.openSession(); -session.beginTransaction(); -session.save( new Event( "Our very first event!", new Date() ) ); -session.save( new Event( "A follow up event", new Date() ) ); -session.getTransaction().commit(); -session.close(); - - - - testBasicUsage first creates some new Event objects and - hands them over to Hibernate for management, using the save method. Hibernate now - takes responsibility to perform an INSERT on the database. - - - - Obtaining a list of entities - ) result ) { - System.out.println( "Event (" + event.getDate() + ") : " + event.getTitle() ); -} -session.getTransaction().commit(); -session.close();]]> - - - - testBasicUsage illustrates use of the Hibernate Query Language - (HQL) to load all existing Event objects from the database and generate the - appropriate SELECT SQL, send it to the database and populate Event - objects with the result set data. - -
- -
- Take it further! - - Practice Exercises - - - Reconfigure the examples to connect to your own persistent relational database. - - - - - With help of the Developer Guide, add an association to - the Event entity to model a message thread. - - - -
- -
\ No newline at end of file diff --git a/documentation/src/main/docbook/quickstart/en-US/content/tutorial_osgi.xml b/documentation/src/main/docbook/quickstart/en-US/content/tutorial_osgi.xml deleted file mode 100644 index 7e9aaa8aa0..0000000000 --- a/documentation/src/main/docbook/quickstart/en-US/content/tutorial_osgi.xml +++ /dev/null @@ -1,110 +0,0 @@ - - - - - OSGi Tutorial - - - Hibernate targets the OSGi 4.3 spec or later and supports three types - of configurations. - - - - Container-Managed JPA - - - Unmanaged JPA - - - Unmanaged Native - - - - - - For more details about OSGi, the three configurations, hibernate-osgi, extensions points, and caveats, please - see the OSGi chapter of the Developer's Guide! - - -
- - Project Overview - - - Each configuration has a QuickStart project located within the download bundle (under osgi). - The bundles can be used as-is within Apache Karaf. Feel free to use them as literal - "quick start" bundle templates. - -
- -
- - Project Structure - - - - osgi/datasource-h2.xml: Enterprise OSGi JPA usage can include a DataSource installed in the container. - The client bundle's persistence.xml references the DataSource through JNDI. For an - example, see how managed-jpa's persistence.xml calls out the - jta-data-source. - - - osgi/[project]/features.xml: This is arguably the most important "quick start" material. It defines - a single Karaf feature ("hibernate-test") that demonstrates the necessary 3rd party libraries and - bundle activation ordering. - - - osgi/[project]/pom.xml: The POM includes typical compile-time dependencies (JPA, OSGi Core, - OSGi Enterprise), as well as OSGi manifest data. - - - osgi/[project]/src/main/resources/OSGI-INF/blueprint/blueprint.xml: - The Blueprint includes container-managed EntityManager - injection (for managed-jpa), as well as demonstrations showing how to register - your custom implementations of Hibernate extension points. - - - osgi/[project]/src/main/resources/META-INF/persistence.xml or - osgi/[project]/src/main/resources/hibernate.cfg.xml: Note that the configurations - are no different than typical uses of Hibernate! - - - osgi/[project]/src/main/java/org/hibernate/osgitest/HibernateUtil.java: Demonstrates how to create an - EntityManagerFactory (JPA) or SessionFactory (Native) using hibernate-osgi's services. Note that in - managed-jpa, this is replaced by DataPointServiceImpl#entityManager, injected by - blueprint.xml (described above). - - -
- -
- - TODOs - - - - If using managed-jpa, features.xml will need the path to - datasource-h2.xml updated. - - -
- -
- - Karaf Commands - - - All three bundles include Karaf Commands that can be used directly on the Karaf command line to test - basic persistence operations ("dp:add [name]", "dp:getall", "dp:deleteall", etc.). I leave them in the - QuickStarts as a useful sanity check. - -
- -
diff --git a/documentation/src/main/docbook/quickstart/en-US/images/hibernate_logo_a.png b/documentation/src/main/docbook/quickstart/en-US/images/hibernate_logo_a.png deleted file mode 100644 index 0a343c4bca60a2d585b3d9efe11c9a328b4c83cc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 31862 zcmeFZXH-;Mur=C%qJn^u1rZEL6hv|p1rY@al9i+&AgK{(l0=UJN){z20RfRDAUUe! zoO6?N&Kdeu<2m>H-uw6d-{Ek`XxqK_TB~Z-oU>~CL0M6jgous^fk2Qvd~i<%fjD;# zfx!RgEIxd)qw#bV{vb4vm%WF;;(mQ8OZfz!oO|`)i7f)bbq)6$@B26=7=d6yJiK>T z%`tir<8BeM6T`jBa!%Po`X=F^-|DFeN&H8n%dZ}Pp%?fnA9*fUB>t0}Gk3)OT$PUI zBg5jD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5ayG{uWF&qG|n(3&!&h=7=Zs38)TdhwE|c?+Q}+rP)I_ z2rJJowEq#2>D~Lx0?i3>yLGIIsyuSxr5;`XG$oZ zu>a;@<)Da8>3RVh6TQ+ZHnK^O5vo)A3=J=AVcU36=k)94nL~KC3tZLBldH*AEe3h*;h1ki`b4G!eZ}K$xs1iQ03$lN_WDHb2ju*a@H%Bc0S^9q|Q9OzY4+Vv6P)T z(oP*NM+v)9$CT*(L6TV4x)>8L5REzxAe_+~RZ{~wsO{pAMt+phluE?sy{(`-r)!w< zbu;&^W#|qG6h=QH!IY^U?NM+ZA+uDAz%FVBchRTEe&pe;pVEFe^Nuj-x~fzHTa#{#kYGvL8?=Iu~F4m!`d+$iTH5DJNBUjJt_Wpi1gHE zU$6+_GbW;x+K6=X>>l=$R1WH;P49|q6O9(}v8I?jCwXLtv$M5*!4ju$7`1zMy>h1Z zv|*p5;;-AJeB|fYeqg@6k(9h$!#({1g&DY1o;rvHCzdic z-5J&LWY%=Ge52%$GX>gmd#PjOuwzH&1ho~8lBrC0|JOsz)Z0U}=}~GgK;6LqPR00P zSr2NGT3$%iby_!8ae$Ou;@JIU#9LW8J|ugBTIr4a^QZ%TMC>mAUz1c^bjvV29KE{+ zUr~XzOi@zN70-PVUz(#`e>nem9qgS%dvvA#?t%{CmH=ZxavV8X5}fU$I?hASf!b!j zq7Ea6U2JS6kB*+x(@X1fa1iy)#N=L|ZT5ta)>IzRq5{m|F-NV0D%`ol8l$}C6mnA& z*hYpaE^1eA%lERm96X+BGnC&v{NQ*QzV1|WFSTVw5?B+~T56L!shw=HLx0exE|I2u zCBTjP?=-D{zY<*W?^l15WTZO z^hc+2T&KTQ{pscOm#Hlp^Qhy~QY@y!@kGk>r>aHkryvfEd**xA|NnQx;lJ2-+1FkH QNpeyu3hH~~ - - - - - - - - - - - - - - - - - diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/.gitignore b/documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/.gitignore deleted file mode 100644 index ea8c4bf7f3..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/features.xml b/documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/features.xml deleted file mode 100755 index b7600d1f11..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/features.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - aries.transaction.recoverable = true - aries.transaction.timeout = 600 - aries.transaction.howl.logFileDir = /tmp/karaf/txlog - aries.transaction.howl.maxLogFiles = 2 - aries.transaction.howl.maxBlocksPerFile = 512 - aries.transaction.howl.bufferSizeKBytes = 4 - - mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1 - mvn:org.apache.aries.transaction/org.apache.aries.transaction.blueprint/1.0.0 - mvn:org.apache.aries.transaction/org.apache.aries.transaction.manager/1.0.1 - - - mvn:org.hibernate.javax.persistence/hibernate-jpa-2.1-api/1.0.0.Final - - mvn:org.apache.aries/org.apache.aries.util/1.1.1-SNAPSHOT - mvn:org.apache.aries.jpa/org.apache.aries.jpa.api/1.0.1-SNAPSHOT - mvn:org.apache.aries.jpa/org.apache.aries.jpa.blueprint.aries/1.0.2-SNAPSHOT - mvn:org.apache.aries.jpa/org.apache.aries.jpa.container/1.0.1-SNAPSHOT - mvn:org.apache.aries.jpa/org.apache.aries.jpa.container.context/1.0.2-SNAPSHOT - - - mvn:org.apache.aries/org.apache.aries.util/1.0.0 - mvn:org.apache.aries.jndi/org.apache.aries.jndi.api/1.0.0 - mvn:org.apache.aries.jndi/org.apache.aries.jndi.core/1.0.0 - mvn:org.apache.aries.jndi/org.apache.aries.jndi.rmi/1.0.0 - mvn:org.apache.aries.jndi/org.apache.aries.jndi.url/1.0.0 - mvn:org.apache.aries.jndi/org.apache.aries.jndi.legacy.support/1.0.0 - - - mvn:commons-collections/commons-collections/3.2.1 - mvn:commons-pool/commons-pool/1.5.4 - mvn:commons-dbcp/commons-dbcp/1.4 - mvn:commons-lang/commons-lang/2.6 - wrap:mvn:net.sourceforge.serp/serp/1.13.1 - - mvn:com.h2database/h2/1.3.170 - blueprint:file:/[PATH]/datasource-h2.xml - - - mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.antlr/2.7.7_5 - mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j/1.6.1_5 - - - wrap:mvn:org.jboss/jandex/1.1.0.Final - - mvn:com.fasterxml/classmate/0.8.0 - mvn:org.apache.logging.log4j/log4j-api/2.0 - mvn:log4j/log4j/1.2.17 - mvn:org.jboss.logging/jboss-logging/3.2.1.Final - mvn:org.javassist/javassist/3.18.1-GA - - mvn:org.hibernate.common/hibernate-commons-annotations/4.0.5.Final - - mvn:org.hibernate/hibernate-core/5.0.0-SNAPSHOT - mvn:org.hibernate/hibernate-entitymanager/5.0.0-SNAPSHOT - - - mvn:org.hibernate.osgi/managed-jpa/1.0.0 - - mvn:org.hibernate/hibernate-osgi/5.0.0-SNAPSHOT - - diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/pom.xml b/documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/pom.xml deleted file mode 100755 index 55ccacd3c9..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/pom.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - 4.0.0 - org.hibernate.osgi - managed-jpa - 1.0.0 - bundle - - - - org.hibernate.javax.persistence - hibernate-jpa-2.1-api - 1.0.0.Final - - - org.osgi - org.osgi.core - 4.3.1 - - - org.osgi - org.osgi.enterprise - 4.2.0 - - - org.apache.karaf.shell - org.apache.karaf.shell.console - 2.3.0 - - - - - - - org.apache.felix - maven-bundle-plugin - true - - - org.hibernate.osgi.managed-jpa - managed-jpa - 1.0.0 - - org.hibernate.osgitest, - org.hibernate.osgitest.entity - - - org.apache.felix.service.command, - org.apache.felix.gogo.commands, - org.apache.karaf.shell.console, - org.apache.karaf.shell.commands, - javax.persistence;version="[1.0.0,2.1.0]", - - org.hibernate.proxy, - javassist.util.proxy, - * - - META-INF/persistence.xml - - - - - - diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/src/main/java/org/hibernate/osgitest/DataPointService.java b/documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/src/main/java/org/hibernate/osgitest/DataPointService.java deleted file mode 100644 index bdeaace115..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/src/main/java/org/hibernate/osgitest/DataPointService.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * JBoss, Home of Professional Open Source - * Copyright 2013 Red Hat Inc. and/or its affiliates and other contributors - * as indicated by the @authors tag. All rights reserved. - * See the copyright.txt in the distribution for a - * full listing of individual contributors. - * - * This copyrighted material is made available to anyone wishing to use, - * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU Lesser General Public License, v. 2.1. - * This program is distributed in the hope that it will be useful, but WITHOUT A - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - * You should have received a copy of the GNU Lesser General Public License, - * v.2.1 along with this distribution; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ -package org.hibernate.osgitest; - -import java.util.List; - -import org.hibernate.osgitest.entity.DataPoint; - -/** - * @author Brett Meyer - */ -public interface DataPointService { - - public void add(DataPoint dp); - - public List getAll(); - - public void deleteAll(); -} diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/src/main/java/org/hibernate/osgitest/DataPointServiceImpl.java b/documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/src/main/java/org/hibernate/osgitest/DataPointServiceImpl.java deleted file mode 100644 index f324889603..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/src/main/java/org/hibernate/osgitest/DataPointServiceImpl.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * JBoss, Home of Professional Open Source - * Copyright 2013 Red Hat Inc. and/or its affiliates and other contributors - * as indicated by the @authors tag. All rights reserved. - * See the copyright.txt in the distribution for a - * full listing of individual contributors. - * - * This copyrighted material is made available to anyone wishing to use, - * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU Lesser General Public License, v. 2.1. - * This program is distributed in the hope that it will be useful, but WITHOUT A - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - * You should have received a copy of the GNU Lesser General Public License, - * v.2.1 along with this distribution; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ -package org.hibernate.osgitest; - -import java.util.List; - -import javax.persistence.EntityManager; - -import org.hibernate.osgitest.entity.DataPoint; - -/** - * @author Brett Meyer - */ -public class DataPointServiceImpl implements DataPointService { - - private EntityManager entityManager; - - public void add(DataPoint dp) { - entityManager.persist( dp ); - entityManager.flush(); - } - - public List getAll() { - return entityManager.createQuery( "select d from DataPoint d", DataPoint.class ).getResultList(); - } - - public void deleteAll() { - entityManager.createQuery( "delete from DataPoint" ).executeUpdate(); - entityManager.flush(); - } - - public EntityManager getEntityManager() { - return entityManager; - } - - public void setEntityManager(EntityManager entityManager) { - this.entityManager = entityManager; - } - -} diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/src/main/java/org/hibernate/osgitest/command/AddCommand.java b/documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/src/main/java/org/hibernate/osgitest/command/AddCommand.java deleted file mode 100644 index 9e9844c331..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/src/main/java/org/hibernate/osgitest/command/AddCommand.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.hibernate.osgitest.command; - -import org.apache.felix.gogo.commands.Action; -import org.apache.felix.gogo.commands.Argument; -import org.apache.felix.gogo.commands.Command; -import org.apache.felix.service.command.CommandSession; -import org.hibernate.osgitest.DataPointService; -import org.hibernate.osgitest.entity.DataPoint; - -@Command(scope = "dp", name = "add") -public class AddCommand implements Action { - @Argument(index=0, name="Name", required=true, description="Name", multiValued=false) - String name; - - private DataPointService dpService; - - public void setDpService(DataPointService dpService) { - this.dpService = dpService; - } - - public Object execute(CommandSession session) throws Exception { - DataPoint dp = new DataPoint(); - dp.setName( name ); - dpService.add( dp ); - return null; - } - -} diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/src/main/java/org/hibernate/osgitest/command/DeleteAllCommand.java b/documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/src/main/java/org/hibernate/osgitest/command/DeleteAllCommand.java deleted file mode 100644 index d6c4ccf676..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/src/main/java/org/hibernate/osgitest/command/DeleteAllCommand.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.hibernate.osgitest.command; - -import org.apache.felix.gogo.commands.Action; -import org.apache.felix.gogo.commands.Command; -import org.apache.felix.service.command.CommandSession; -import org.hibernate.osgitest.DataPointService; - -@Command(scope = "dp", name = "deleteAll") -public class DeleteAllCommand implements Action { -private DataPointService dpService; - - public void setDpService(DataPointService dpService) { - this.dpService = dpService; - } - - public Object execute(CommandSession session) throws Exception { - dpService.deleteAll(); - return null; - } - -} diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/src/main/java/org/hibernate/osgitest/command/GetAllCommand.java b/documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/src/main/java/org/hibernate/osgitest/command/GetAllCommand.java deleted file mode 100644 index ebdac60ea2..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/src/main/java/org/hibernate/osgitest/command/GetAllCommand.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.hibernate.osgitest.command; - -import java.util.List; - -import org.apache.felix.gogo.commands.Action; -import org.apache.felix.gogo.commands.Command; -import org.apache.felix.service.command.CommandSession; -import org.hibernate.osgitest.DataPointService; -import org.hibernate.osgitest.entity.DataPoint; - -@Command(scope = "dp", name = "getAll") -public class GetAllCommand implements Action { - private DataPointService dpService; - - public void setDpService(DataPointService dpService) { - this.dpService = dpService; - } - - public Object execute(CommandSession session) throws Exception { - List dps = dpService.getAll(); - for (DataPoint dp : dps) { - System.out.println(dp.getId() + ", " + dp.getName()); - } - return null; - } - -} diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/src/main/java/org/hibernate/osgitest/entity/DataPoint.java b/documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/src/main/java/org/hibernate/osgitest/entity/DataPoint.java deleted file mode 100644 index 2a566d8829..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/src/main/java/org/hibernate/osgitest/entity/DataPoint.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * JBoss, Home of Professional Open Source - * Copyright 2013 Red Hat Inc. and/or its affiliates and other contributors - * as indicated by the @authors tag. All rights reserved. - * See the copyright.txt in the distribution for a - * full listing of individual contributors. - * - * This copyrighted material is made available to anyone wishing to use, - * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU Lesser General Public License, v. 2.1. - * This program is distributed in the hope that it will be useful, but WITHOUT A - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - * You should have received a copy of the GNU Lesser General Public License, - * v.2.1 along with this distribution; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ -package org.hibernate.osgitest.entity; - -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; - -/** - * @author Brett Meyer - */ -@Entity -public class DataPoint { - @Id - @GeneratedValue - private long id; - - private String 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; - } -} diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/src/main/resources/META-INF/persistence.xml b/documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/src/main/resources/META-INF/persistence.xml deleted file mode 100644 index 77555cb42c..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/src/main/resources/META-INF/persistence.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=jdbc/h2ds) - - - - - - - - - \ No newline at end of file diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/src/main/resources/OSGI-INF/blueprint/blueprint.xml deleted file mode 100644 index 2436aa7467..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/src/main/resources/OSGI-INF/blueprint/blueprint.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/.gitignore b/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/.gitignore deleted file mode 100644 index ea8c4bf7f3..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/features.xml b/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/features.xml deleted file mode 100644 index 30a32a0d7f..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/features.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1 - - - mvn:org.hibernate.javax.persistence/hibernate-jpa-2.1-api/1.0.0.Final - - - mvn:commons-collections/commons-collections/3.2.1 - mvn:commons-pool/commons-pool/1.5.4 - mvn:commons-dbcp/commons-dbcp/1.4 - mvn:commons-lang/commons-lang/2.6 - wrap:mvn:net.sourceforge.serp/serp/1.13.1 - - mvn:com.h2database/h2/1.3.170 - - - mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.antlr/2.7.7_5 - mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j/1.6.1_5 - - - wrap:mvn:org.jboss/jandex/1.1.0.Final - - mvn:com.fasterxml/classmate/0.8.0 - mvn:org.apache.logging.log4j/log4j-api/2.0 - mvn:log4j/log4j/1.2.17 - mvn:org.jboss.logging/jboss-logging/3.2.1.Final - mvn:org.javassist/javassist/3.18.1-GA - - mvn:org.hibernate.common/hibernate-commons-annotations/4.0.5.Final - - mvn:org.hibernate/hibernate-core/5.0.0-SNAPSHOT - mvn:org.hibernate/hibernate-entitymanager/5.0.0-SNAPSHOT - mvn:org.hibernate/hibernate-osgi/5.0.0-SNAPSHOT - - mvn:org.hibernate.osgi/unmanaged-jpa/1.0.0 - - diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/pom.xml b/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/pom.xml deleted file mode 100755 index d5a23ff555..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/pom.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - 4.0.0 - org.hibernate.osgi - unmanaged-jpa - 1.0.0 - bundle - - - - org.hibernate.javax.persistence - hibernate-jpa-2.1-api - 1.0.0.Final - - - org.osgi - org.osgi.core - 4.3.1 - - - org.osgi - org.osgi.enterprise - 4.2.0 - - - org.apache.karaf.shell - org.apache.karaf.shell.console - 2.3.0 - - - org.hibernate - hibernate-entitymanager - 5.0.0-SNAPSHOT - - - com.h2database - h2 - 1.3.170 - - - - - - - - org.apache.felix - maven-bundle-plugin - true - - - org.hibernate.osgi.unmanaged-jpa - unmanaged-jpa - 1.0.0 - - org.hibernate.osgitest, - org.hibernate.osgitest.entity - - - org.apache.felix.service.command, - org.apache.felix.gogo.commands, - org.apache.karaf.shell.console, - org.apache.karaf.shell.commands, - org.h2, - javax.persistence;version="[1.0.0,2.1.0]", - - org.hibernate.proxy, - javassist.util.proxy, - * - - - - - - - diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/DataPointService.java b/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/DataPointService.java deleted file mode 100644 index de8c960c1f..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/DataPointService.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * JBoss, Home of Professional Open Source - * Copyright 2013 Red Hat Inc. and/or its affiliates and other contributors - * as indicated by the @authors tag. All rights reserved. - * See the copyright.txt in the distribution for a - * full listing of individual contributors. - * - * This copyrighted material is made available to anyone wishing to use, - * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU Lesser General Public License, v. 2.1. - * This program is distributed in the hope that it will be useful, but WITHOUT A - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - * You should have received a copy of the GNU Lesser General Public License, - * v.2.1 along with this distribution; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ -package org.hibernate.osgitest; - -import java.util.List; - -import org.hibernate.osgitest.entity.DataPoint; - -/** - * @author Brett Meyer - */ -public interface DataPointService { - - public void add(DataPoint dp); - - public void update(DataPoint dp); - - public DataPoint get(long id); - - public List getAll(); - - public void deleteAll(); -} diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/DataPointServiceImpl.java b/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/DataPointServiceImpl.java deleted file mode 100644 index dba3609e97..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/DataPointServiceImpl.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * JBoss, Home of Professional Open Source - * Copyright 2013 Red Hat Inc. and/or its affiliates and other contributors - * as indicated by the @authors tag. All rights reserved. - * See the copyright.txt in the distribution for a - * full listing of individual contributors. - * - * This copyrighted material is made available to anyone wishing to use, - * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU Lesser General Public License, v. 2.1. - * This program is distributed in the hope that it will be useful, but WITHOUT A - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - * You should have received a copy of the GNU Lesser General Public License, - * v.2.1 along with this distribution; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ -package org.hibernate.osgitest; - -import java.util.List; - -import javax.persistence.EntityManager; - -import org.hibernate.osgitest.entity.DataPoint; - -/** - * @author Brett Meyer - */ -public class DataPointServiceImpl implements DataPointService { - - private HibernateUtil hibernateUtil = new HibernateUtil(); - - public void add(DataPoint dp) { - EntityManager em = hibernateUtil.getEntityManager(); - em.getTransaction().begin(); - em.persist( dp ); - em.getTransaction().commit(); - em.close(); - } - - public void update(DataPoint dp) { - EntityManager em = hibernateUtil.getEntityManager(); - em.getTransaction().begin(); - em.merge( dp ); - em.getTransaction().commit(); - em.close(); - } - - public DataPoint get(long id) { - EntityManager em = hibernateUtil.getEntityManager(); - em.getTransaction().begin(); - DataPoint dp = (DataPoint) em.createQuery( "from DataPoint dp where dp.id=" + id ).getSingleResult(); - em.getTransaction().commit(); - em.close(); - return dp; - } - - public List getAll() { - EntityManager em = hibernateUtil.getEntityManager(); - em.getTransaction().begin(); - List list = em.createQuery( "from DataPoint" ).getResultList(); - em.getTransaction().commit(); - em.close(); - return list; - } - - public void deleteAll() { - EntityManager em = hibernateUtil.getEntityManager(); - em.getTransaction().begin(); - em.createQuery( "delete from DataPoint" ).executeUpdate(); - em.getTransaction().commit(); - em.close(); - } - -} diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/HibernateUtil.java b/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/HibernateUtil.java deleted file mode 100644 index 0927f15f7d..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/HibernateUtil.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * JBoss, Home of Professional Open Source - * Copyright 2013 Red Hat Inc. and/or its affiliates and other contributors - * as indicated by the @authors tag. All rights reserved. - * See the copyright.txt in the distribution for a - * full listing of individual contributors. - * - * This copyrighted material is made available to anyone wishing to use, - * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU Lesser General Public License, v. 2.1. - * This program is distributed in the hope that it will be useful, but WITHOUT A - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - * You should have received a copy of the GNU Lesser General Public License, - * v.2.1 along with this distribution; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ -package org.hibernate.osgitest; - -import javax.persistence.EntityManager; -import javax.persistence.EntityManagerFactory; -import javax.persistence.spi.PersistenceProvider; - -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -/** - * @author Brett Meyer - */ - -public class HibernateUtil { - - private EntityManagerFactory emf; - - public EntityManager getEntityManager() { - return getEntityManagerFactory().createEntityManager(); - } - - private EntityManagerFactory getEntityManagerFactory() { - if ( emf == null ) { - Bundle thisBundle = FrameworkUtil.getBundle( HibernateUtil.class ); - // Could get this by wiring up OsgiTestBundleActivator as well. - BundleContext context = thisBundle.getBundleContext(); - - ServiceReference serviceReference = context.getServiceReference( PersistenceProvider.class.getName() ); - PersistenceProvider persistenceProvider = (PersistenceProvider) context.getService( serviceReference ); - - emf = persistenceProvider.createEntityManagerFactory( "unmanaged-jpa", null ); - } - return emf; - } -} diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/TestIntegrator.java b/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/TestIntegrator.java deleted file mode 100644 index f4436346cc..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/TestIntegrator.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * JBoss, Home of Professional Open Source - * Copyright 2013 Red Hat Inc. and/or its affiliates and other contributors - * as indicated by the @authors tag. All rights reserved. - * See the copyright.txt in the distribution for a - * full listing of individual contributors. - * - * This copyrighted material is made available to anyone wishing to use, - * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU Lesser General Public License, v. 2.1. - * This program is distributed in the hope that it will be useful, but WITHOUT A - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - * You should have received a copy of the GNU Lesser General Public License, - * v.2.1 along with this distribution; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ -package org.hibernate.osgitest; - -import org.hibernate.boot.Metadata; -import org.hibernate.engine.spi.SessionFactoryImplementor; -import org.hibernate.integrator.spi.Integrator; -import org.hibernate.service.spi.SessionFactoryServiceRegistry; - - -/** - * @author Brett Meyer - */ -public class TestIntegrator implements Integrator { - - public void integrate( - Metadata metadata, - SessionFactoryImplementor sessionFactory, - SessionFactoryServiceRegistry serviceRegistry) { - System.out.println("Integrator#integrate"); - } - - public void disintegrate(SessionFactoryImplementor sessionFactory, SessionFactoryServiceRegistry serviceRegistry) { - System.out.println("Integrator#disintegrate"); - } - -} diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/TestStrategyRegistrationProvider.java b/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/TestStrategyRegistrationProvider.java deleted file mode 100644 index f7ad26f593..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/TestStrategyRegistrationProvider.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * JBoss, Home of Professional Open Source - * Copyright 2013 Red Hat Inc. and/or its affiliates and other contributors - * as indicated by the @authors tag. All rights reserved. - * See the copyright.txt in the distribution for a - * full listing of individual contributors. - * - * This copyrighted material is made available to anyone wishing to use, - * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU Lesser General Public License, v. 2.1. - * This program is distributed in the hope that it will be useful, but WITHOUT A - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - * You should have received a copy of the GNU Lesser General Public License, - * v.2.1 along with this distribution; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ -package org.hibernate.osgitest; - -import java.util.Collections; - -import org.hibernate.boot.registry.selector.StrategyRegistration; -import org.hibernate.boot.registry.selector.StrategyRegistrationProvider; - -/** - * @author Brett Meyer - */ -public class TestStrategyRegistrationProvider implements StrategyRegistrationProvider { - - public Iterable getStrategyRegistrations() { - System.out.println("StrategyRegistrationProvider#getStrategyRegistrations"); - return Collections.EMPTY_LIST; - } -} diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/TestTypeContributor.java b/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/TestTypeContributor.java deleted file mode 100644 index 0da11cb60a..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/TestTypeContributor.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * JBoss, Home of Professional Open Source - * Copyright 2013 Red Hat Inc. and/or its affiliates and other contributors - * as indicated by the @authors tag. All rights reserved. - * See the copyright.txt in the distribution for a - * full listing of individual contributors. - * - * This copyrighted material is made available to anyone wishing to use, - * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU Lesser General Public License, v. 2.1. - * This program is distributed in the hope that it will be useful, but WITHOUT A - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - * You should have received a copy of the GNU Lesser General Public License, - * v.2.1 along with this distribution; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ -package org.hibernate.osgitest; - -import org.hibernate.boot.model.TypeContributions; -import org.hibernate.boot.model.TypeContributor; -import org.hibernate.service.ServiceRegistry; - - -/** - * @author Brett Meyer - */ -public class TestTypeContributor implements TypeContributor { - - public void contribute(TypeContributions typeContributions, ServiceRegistry serviceRegistry) { - System.out.println("TypeContributor#contribute"); - } - -} diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/command/AddCommand.java b/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/command/AddCommand.java deleted file mode 100644 index c1b906c012..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/command/AddCommand.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.hibernate.osgitest.command; - -import org.apache.felix.gogo.commands.Action; -import org.apache.felix.gogo.commands.Argument; -import org.apache.felix.gogo.commands.Command; -import org.apache.felix.service.command.CommandSession; -import org.hibernate.osgitest.DataPointService; -import org.hibernate.osgitest.entity.DataPoint; - -@Command(scope = "dp", name = "addJPA") -public class AddCommand implements Action { - @Argument(index=0, name="Name", required=true, description="Name", multiValued=false) - String name; - - private DataPointService dpService; - - public void setDpService(DataPointService dpService) { - this.dpService = dpService; - } - - public Object execute(CommandSession session) throws Exception { - DataPoint dp = new DataPoint(); - dp.setName( name ); - dpService.add( dp ); - return null; - } - -} diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/command/DeleteAllCommand.java b/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/command/DeleteAllCommand.java deleted file mode 100644 index 0d404ae1a1..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/command/DeleteAllCommand.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.hibernate.osgitest.command; - -import org.apache.felix.gogo.commands.Action; -import org.apache.felix.gogo.commands.Command; -import org.apache.felix.service.command.CommandSession; -import org.hibernate.osgitest.DataPointService; - -@Command(scope = "dp", name = "deleteAllJPA") -public class DeleteAllCommand implements Action { -private DataPointService dpService; - - public void setDpService(DataPointService dpService) { - this.dpService = dpService; - } - - public Object execute(CommandSession session) throws Exception { - dpService.deleteAll(); - return null; - } - -} diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/command/GetAllCommand.java b/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/command/GetAllCommand.java deleted file mode 100644 index 6873e46303..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/command/GetAllCommand.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.hibernate.osgitest.command; - -import java.util.List; - -import org.apache.felix.gogo.commands.Action; -import org.apache.felix.gogo.commands.Command; -import org.apache.felix.service.command.CommandSession; -import org.hibernate.osgitest.DataPointService; -import org.hibernate.osgitest.entity.DataPoint; - -@Command(scope = "dp", name = "getAllJPA") -public class GetAllCommand implements Action { - private DataPointService dpService; - - public void setDpService(DataPointService dpService) { - this.dpService = dpService; - } - - public Object execute(CommandSession session) throws Exception { - List dps = dpService.getAll(); - for (DataPoint dp : dps) { - System.out.println(dp.getId() + ", " + dp.getName()); - } - return null; - } - -} diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/command/UpdateCommand.java b/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/command/UpdateCommand.java deleted file mode 100644 index 5de8983dd9..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/command/UpdateCommand.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.hibernate.osgitest.command; - -import org.apache.felix.gogo.commands.Action; -import org.apache.felix.gogo.commands.Argument; -import org.apache.felix.gogo.commands.Command; -import org.apache.felix.service.command.CommandSession; -import org.hibernate.osgitest.DataPointService; -import org.hibernate.osgitest.entity.DataPoint; - -@Command(scope = "dp", name = "updateJPA") -public class UpdateCommand implements Action { - @Argument(index=0, name="Id", required=true, description="Id", multiValued=false) - String id; - - @Argument(index=1, name="Name", required=true, description="Name", multiValued=false) - String name; - - private DataPointService dpService; - - public void setDpService(DataPointService dpService) { - this.dpService = dpService; - } - - public Object execute(CommandSession session) throws Exception { - DataPoint dp = dpService.get( Long.valueOf( id ) ); - dp.setName( name ); - dpService.update( dp ); - return null; - } - -} diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/entity/DataPoint.java b/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/entity/DataPoint.java deleted file mode 100644 index 2a566d8829..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/java/org/hibernate/osgitest/entity/DataPoint.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * JBoss, Home of Professional Open Source - * Copyright 2013 Red Hat Inc. and/or its affiliates and other contributors - * as indicated by the @authors tag. All rights reserved. - * See the copyright.txt in the distribution for a - * full listing of individual contributors. - * - * This copyrighted material is made available to anyone wishing to use, - * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU Lesser General Public License, v. 2.1. - * This program is distributed in the hope that it will be useful, but WITHOUT A - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - * You should have received a copy of the GNU Lesser General Public License, - * v.2.1 along with this distribution; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ -package org.hibernate.osgitest.entity; - -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; - -/** - * @author Brett Meyer - */ -@Entity -public class DataPoint { - @Id - @GeneratedValue - private long id; - - private String 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; - } -} diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/resources/META-INF/persistence.xml b/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/resources/META-INF/persistence.xml deleted file mode 100644 index b0ebfe7053..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/resources/META-INF/persistence.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - org.hibernate.osgitest.entity.DataPoint - true - - - - - - - - - - - \ No newline at end of file diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/resources/OSGI-INF/blueprint/blueprint.xml deleted file mode 100644 index 283ee1073a..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-jpa/src/main/resources/OSGI-INF/blueprint/blueprint.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/.gitignore b/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/.gitignore deleted file mode 100644 index ea8c4bf7f3..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/features.xml b/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/features.xml deleted file mode 100644 index db86b0dacd..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/features.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1 - - - mvn:org.hibernate.javax.persistence/hibernate-jpa-2.1-api/1.0.0.Final - - - mvn:commons-collections/commons-collections/3.2.1 - mvn:commons-pool/commons-pool/1.5.4 - mvn:commons-dbcp/commons-dbcp/1.4 - mvn:commons-lang/commons-lang/2.6 - wrap:mvn:net.sourceforge.serp/serp/1.13.1 - - mvn:com.h2database/h2/1.3.170 - - - mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.antlr/2.7.7_5 - mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j/1.6.1_5 - - - wrap:mvn:org.jboss/jandex/1.1.0.Final - - - - - - - - mvn:com.fasterxml/classmate/0.8.0 - mvn:org.apache.logging.log4j/log4j-api/2.0 - mvn:log4j/log4j/1.2.17 - mvn:org.jboss.logging/jboss-logging/3.2.1.Final - mvn:org.javassist/javassist/3.18.1-GA - - mvn:org.hibernate.common/hibernate-commons-annotations/4.0.5.Final - - - - - - - - - - - - mvn:org.hibernate/hibernate-core/5.0.0-SNAPSHOT - - mvn:org.hibernate/hibernate-entitymanager/5.0.0-SNAPSHOT - mvn:org.hibernate/hibernate-envers/5.0.0-SNAPSHOT - - - - - mvn:org.hibernate/hibernate-osgi/5.0.0-SNAPSHOT - - mvn:org.hibernate.osgi/unmanaged-native/1.0.0 - - diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/pom.xml b/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/pom.xml deleted file mode 100755 index cc32c375cc..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/pom.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - 4.0.0 - org.hibernate.osgi - unmanaged-native - 1.0.0 - bundle - - - - org.hibernate.javax.persistence - hibernate-jpa-2.1-api - 1.0.0.Final - - - org.osgi - org.osgi.core - 4.3.1 - - - org.osgi - org.osgi.enterprise - 4.2.0 - - - org.apache.karaf.shell - org.apache.karaf.shell.console - 2.3.0 - - - org.hibernate - hibernate-core - 5.0.0-SNAPSHOT - - - org.hibernate - hibernate-envers - 5.0.0-SNAPSHOT - - - com.h2database - h2 - 1.3.170 - - - - - - - - org.apache.felix - maven-bundle-plugin - true - - - org.hibernate.osgi.unmanaged-native - unmanaged-native - 1.0.0 - - org.hibernate.osgitest, - org.hibernate.osgitest.entity - - - org.apache.felix.service.command, - org.apache.felix.gogo.commands, - org.apache.karaf.shell.console, - org.apache.karaf.shell.commands, - org.h2, - org.hibernate, - org.hibernate.cfg, - org.hibernate.service, - javax.persistence;version="[1.0.0,2.1.0]", - - org.hibernate.proxy, - javassist.util.proxy, - * - - - - - - - diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/DataPointService.java b/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/DataPointService.java deleted file mode 100644 index 12fb79a95a..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/DataPointService.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * JBoss, Home of Professional Open Source - * Copyright 2013 Red Hat Inc. and/or its affiliates and other contributors - * as indicated by the @authors tag. All rights reserved. - * See the copyright.txt in the distribution for a - * full listing of individual contributors. - * - * This copyrighted material is made available to anyone wishing to use, - * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU Lesser General Public License, v. 2.1. - * This program is distributed in the hope that it will be useful, but WITHOUT A - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - * You should have received a copy of the GNU Lesser General Public License, - * v.2.1 along with this distribution; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ -package org.hibernate.osgitest; - -import java.util.List; -import java.util.Map; - -import org.hibernate.envers.DefaultRevisionEntity; -import org.hibernate.osgitest.entity.DataPoint; - -/** - * @author Brett Meyer - */ -public interface DataPointService { - - public void add(DataPoint dp); - - public void update(DataPoint dp); - - public DataPoint get(long id); - - public DataPoint load(long id); - - public List getAll(); - - public Map getRevisions(long id); - - public void deleteAll(); -} diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/DataPointServiceImpl.java b/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/DataPointServiceImpl.java deleted file mode 100644 index a8f6f72023..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/DataPointServiceImpl.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * JBoss, Home of Professional Open Source - * Copyright 2013 Red Hat Inc. and/or its affiliates and other contributors - * as indicated by the @authors tag. All rights reserved. - * See the copyright.txt in the distribution for a - * full listing of individual contributors. - * - * This copyrighted material is made available to anyone wishing to use, - * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU Lesser General Public License, v. 2.1. - * This program is distributed in the hope that it will be useful, but WITHOUT A - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - * You should have received a copy of the GNU Lesser General Public License, - * v.2.1 along with this distribution; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ -package org.hibernate.osgitest; - -import org.hibernate.Session; -import org.hibernate.criterion.Restrictions; -import org.hibernate.envers.AuditReader; -import org.hibernate.envers.AuditReaderFactory; -import org.hibernate.envers.DefaultRevisionEntity; -import org.hibernate.osgitest.entity.DataPoint; - -import java.util.HashSet; -import java.util.List; -import java.util.Map; - -/** - * @author Brett Meyer - */ -public class DataPointServiceImpl implements DataPointService { - - private HibernateUtil hibernateUtil = new HibernateUtil(); - - public void add(DataPoint dp) { - Session s = hibernateUtil.getSession(); - s.getTransaction().begin(); - s.persist( dp ); - s.getTransaction().commit(); - s.close(); - } - - public void update(DataPoint dp) { - Session s = hibernateUtil.getSession(); - s.getTransaction().begin(); - s.update( dp ); - s.getTransaction().commit(); - s.close(); - } - - public DataPoint get(long id) { - Session s = hibernateUtil.getSession(); - s.getTransaction().begin(); - DataPoint dp = (DataPoint) s.createCriteria( DataPoint.class ).add( - Restrictions.eq( "id", id ) ).uniqueResult(); - s.getTransaction().commit(); - s.close(); - return dp; - } - - // Test lazy loading (mainly to make sure the proxy classes work in OSGi) - public DataPoint load(long id) { - Session s = hibernateUtil.getSession(); - s.getTransaction().begin(); - DataPoint dp = (DataPoint) s.load( DataPoint.class, new Long(id) ); - // initialize - dp.getName(); - s.getTransaction().commit(); - s.close(); - return dp; - } - - public List getAll() { - Session s = hibernateUtil.getSession(); - s.getTransaction().begin(); - List list = s.createQuery( "from DataPoint" ).list(); - s.getTransaction().commit(); - s.close(); - return list; - } - - public Map getRevisions(long id) { - Session s = hibernateUtil.getSession(); - AuditReader reader = AuditReaderFactory.get(s); - List revisionNums = reader.getRevisions( DataPoint.class, id ); - return reader.findRevisions( DefaultRevisionEntity.class, new HashSet(revisionNums) ); - } - - public void deleteAll() { - Session s = hibernateUtil.getSession(); - s.getTransaction().begin(); - s.createQuery( "delete from DataPoint" ).executeUpdate(); - s.getTransaction().commit(); - s.close(); - } - -} diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/HibernateUtil.java b/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/HibernateUtil.java deleted file mode 100644 index 15fb4c7db1..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/HibernateUtil.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * JBoss, Home of Professional Open Source - * Copyright 2013 Red Hat Inc. and/or its affiliates and other contributors - * as indicated by the @authors tag. All rights reserved. - * See the copyright.txt in the distribution for a - * full listing of individual contributors. - * - * This copyrighted material is made available to anyone wishing to use, - * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU Lesser General Public License, v. 2.1. - * This program is distributed in the hope that it will be useful, but WITHOUT A - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - * You should have received a copy of the GNU Lesser General Public License, - * v.2.1 along with this distribution; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ -package org.hibernate.osgitest; - -import org.hibernate.Session; -import org.hibernate.SessionFactory; -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -/** - * @author Brett Meyer - */ - -public class HibernateUtil { - - private SessionFactory sf; - - public Session getSession() { - return getSessionFactory().openSession(); - } - - private SessionFactory getSessionFactory() { - if ( sf == null ) { - Bundle thisBundle = FrameworkUtil.getBundle( HibernateUtil.class ); - // Could get this by wiring up OsgiTestBundleActivator as well. - BundleContext context = thisBundle.getBundleContext(); - - ServiceReference sr = context.getServiceReference( SessionFactory.class.getName() ); - sf = (SessionFactory) context.getService( sr ); - } - return sf; - } -} diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/TestIntegrator.java b/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/TestIntegrator.java deleted file mode 100644 index 95b2e631db..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/TestIntegrator.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * JBoss, Home of Professional Open Source - * Copyright 2013 Red Hat Inc. and/or its affiliates and other contributors - * as indicated by the @authors tag. All rights reserved. - * See the copyright.txt in the distribution for a - * full listing of individual contributors. - * - * This copyrighted material is made available to anyone wishing to use, - * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU Lesser General Public License, v. 2.1. - * This program is distributed in the hope that it will be useful, but WITHOUT A - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - * You should have received a copy of the GNU Lesser General Public License, - * v.2.1 along with this distribution; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ -package org.hibernate.osgitest; - -import org.hibernate.boot.Metadata; -import org.hibernate.engine.spi.SessionFactoryImplementor; -import org.hibernate.integrator.spi.Integrator; -import org.hibernate.service.spi.SessionFactoryServiceRegistry; - - -/** - * @author Brett Meyer - */ -public class TestIntegrator implements Integrator { - - public void integrate( - Metadata metadata, - SessionFactoryImplementor sessionFactory, - SessionFactoryServiceRegistry serviceRegistry) { - System.out.println("Integrator#integrate"); - } - - public void disintegrate(SessionFactoryImplementor sessionFactory, SessionFactoryServiceRegistry serviceRegistry) { - System.out.println("Integrator#disintegrate"); - } - -} diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/TestStrategyRegistrationProvider.java b/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/TestStrategyRegistrationProvider.java deleted file mode 100644 index f7ad26f593..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/TestStrategyRegistrationProvider.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * JBoss, Home of Professional Open Source - * Copyright 2013 Red Hat Inc. and/or its affiliates and other contributors - * as indicated by the @authors tag. All rights reserved. - * See the copyright.txt in the distribution for a - * full listing of individual contributors. - * - * This copyrighted material is made available to anyone wishing to use, - * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU Lesser General Public License, v. 2.1. - * This program is distributed in the hope that it will be useful, but WITHOUT A - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - * You should have received a copy of the GNU Lesser General Public License, - * v.2.1 along with this distribution; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ -package org.hibernate.osgitest; - -import java.util.Collections; - -import org.hibernate.boot.registry.selector.StrategyRegistration; -import org.hibernate.boot.registry.selector.StrategyRegistrationProvider; - -/** - * @author Brett Meyer - */ -public class TestStrategyRegistrationProvider implements StrategyRegistrationProvider { - - public Iterable getStrategyRegistrations() { - System.out.println("StrategyRegistrationProvider#getStrategyRegistrations"); - return Collections.EMPTY_LIST; - } -} diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/TestTypeContributor.java b/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/TestTypeContributor.java deleted file mode 100644 index 87a8384176..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/TestTypeContributor.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * JBoss, Home of Professional Open Source - * Copyright 2013 Red Hat Inc. and/or its affiliates and other contributors - * as indicated by the @authors tag. All rights reserved. - * See the copyright.txt in the distribution for a - * full listing of individual contributors. - * - * This copyrighted material is made available to anyone wishing to use, - * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU Lesser General Public License, v. 2.1. - * This program is distributed in the hope that it will be useful, but WITHOUT A - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - * You should have received a copy of the GNU Lesser General Public License, - * v.2.1 along with this distribution; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ -package org.hibernate.osgitest; - -import org.hibernate.boot.model.TypeContributions; -import org.hibernate.boot.model.TypeContributor; -import org.hibernate.service.ServiceRegistry; - - -/** - * @author Brett Meyer - */ -public class TestTypeContributor implements TypeContributor { - - public void contribute(TypeContributions typeContributions, ServiceRegistry serviceRegistry) { - System.out.println("TypeContributor#contribute"); - } - -} diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/command/AddCommand.java b/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/command/AddCommand.java deleted file mode 100644 index 9e9844c331..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/command/AddCommand.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.hibernate.osgitest.command; - -import org.apache.felix.gogo.commands.Action; -import org.apache.felix.gogo.commands.Argument; -import org.apache.felix.gogo.commands.Command; -import org.apache.felix.service.command.CommandSession; -import org.hibernate.osgitest.DataPointService; -import org.hibernate.osgitest.entity.DataPoint; - -@Command(scope = "dp", name = "add") -public class AddCommand implements Action { - @Argument(index=0, name="Name", required=true, description="Name", multiValued=false) - String name; - - private DataPointService dpService; - - public void setDpService(DataPointService dpService) { - this.dpService = dpService; - } - - public Object execute(CommandSession session) throws Exception { - DataPoint dp = new DataPoint(); - dp.setName( name ); - dpService.add( dp ); - return null; - } - -} diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/command/DeleteAllCommand.java b/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/command/DeleteAllCommand.java deleted file mode 100644 index d6c4ccf676..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/command/DeleteAllCommand.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.hibernate.osgitest.command; - -import org.apache.felix.gogo.commands.Action; -import org.apache.felix.gogo.commands.Command; -import org.apache.felix.service.command.CommandSession; -import org.hibernate.osgitest.DataPointService; - -@Command(scope = "dp", name = "deleteAll") -public class DeleteAllCommand implements Action { -private DataPointService dpService; - - public void setDpService(DataPointService dpService) { - this.dpService = dpService; - } - - public Object execute(CommandSession session) throws Exception { - dpService.deleteAll(); - return null; - } - -} diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/command/GetAllCommand.java b/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/command/GetAllCommand.java deleted file mode 100644 index ebdac60ea2..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/command/GetAllCommand.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.hibernate.osgitest.command; - -import java.util.List; - -import org.apache.felix.gogo.commands.Action; -import org.apache.felix.gogo.commands.Command; -import org.apache.felix.service.command.CommandSession; -import org.hibernate.osgitest.DataPointService; -import org.hibernate.osgitest.entity.DataPoint; - -@Command(scope = "dp", name = "getAll") -public class GetAllCommand implements Action { - private DataPointService dpService; - - public void setDpService(DataPointService dpService) { - this.dpService = dpService; - } - - public Object execute(CommandSession session) throws Exception { - List dps = dpService.getAll(); - for (DataPoint dp : dps) { - System.out.println(dp.getId() + ", " + dp.getName()); - } - return null; - } - -} diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/command/GetCommand.java b/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/command/GetCommand.java deleted file mode 100644 index 0597d709dd..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/command/GetCommand.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.hibernate.osgitest.command; - -import org.apache.felix.gogo.commands.Action; -import org.apache.felix.gogo.commands.Argument; -import org.apache.felix.gogo.commands.Command; -import org.apache.felix.service.command.CommandSession; -import org.hibernate.osgitest.DataPointService; -import org.hibernate.osgitest.entity.DataPoint; - -@Command(scope = "dp", name = "get") -public class GetCommand implements Action { - @Argument(index = 0, name = "Id", required = true, description = "Id", multiValued = false) - String id; - - private DataPointService dpService; - - public void setDpService(DataPointService dpService) { - this.dpService = dpService; - } - - public Object execute(CommandSession session) throws Exception { - DataPoint dp = dpService.get( Long.valueOf( id ) ); - System.out.println( dp.getId() + ", " + dp.getName() ); - return null; - } - -} diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/command/GetRevisionsCommand.java b/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/command/GetRevisionsCommand.java deleted file mode 100644 index b4573f6200..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/command/GetRevisionsCommand.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.hibernate.osgitest.command; - -import java.util.Map; - -import org.apache.felix.gogo.commands.Action; -import org.apache.felix.gogo.commands.Argument; -import org.apache.felix.gogo.commands.Command; -import org.apache.felix.service.command.CommandSession; -import org.hibernate.envers.DefaultRevisionEntity; -import org.hibernate.osgitest.DataPointService; - -@Command(scope = "dp", name = "getRevisions") -public class GetRevisionsCommand implements Action { - @Argument(index=0, name="Id", required=true, description="Id", multiValued=false) - String id; - - private DataPointService dpService; - - public void setDpService(DataPointService dpService) { - this.dpService = dpService; - } - - public Object execute(CommandSession session) throws Exception { - Map revisions = dpService.getRevisions(Long.valueOf( id )); - for (Number revisionNum : revisions.keySet()) { - DefaultRevisionEntity dre = revisions.get( revisionNum ); - System.out.println(revisionNum + ": " + dre.getId() + ", " + dre.getTimestamp()); - } - return null; - } - -} diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/command/LoadCommand.java b/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/command/LoadCommand.java deleted file mode 100644 index 3451a986ba..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/command/LoadCommand.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.hibernate.osgitest.command; - -import org.apache.felix.gogo.commands.Action; -import org.apache.felix.gogo.commands.Argument; -import org.apache.felix.gogo.commands.Command; -import org.apache.felix.service.command.CommandSession; -import org.hibernate.osgitest.DataPointService; -import org.hibernate.osgitest.entity.DataPoint; - -@Command(scope = "dp", name = "load") -public class LoadCommand implements Action { - @Argument(index = 0, name = "Id", required = true, description = "Id", multiValued = false) - String id; - - private DataPointService dpService; - - public void setDpService(DataPointService dpService) { - this.dpService = dpService; - } - - public Object execute(CommandSession session) throws Exception { - DataPoint dp = dpService.load( Long.valueOf( id ) ); - System.out.println( dp.getId() + ", " + dp.getName() ); - return null; - } - -} diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/command/UpdateCommand.java b/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/command/UpdateCommand.java deleted file mode 100644 index f694967444..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/command/UpdateCommand.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.hibernate.osgitest.command; - -import org.apache.felix.gogo.commands.Action; -import org.apache.felix.gogo.commands.Argument; -import org.apache.felix.gogo.commands.Command; -import org.apache.felix.service.command.CommandSession; -import org.hibernate.osgitest.DataPointService; -import org.hibernate.osgitest.entity.DataPoint; - -@Command(scope = "dp", name = "update") -public class UpdateCommand implements Action { - @Argument(index=0, name="Id", required=true, description="Id", multiValued=false) - String id; - - @Argument(index=1, name="Name", required=true, description="Name", multiValued=false) - String name; - - private DataPointService dpService; - - public void setDpService(DataPointService dpService) { - this.dpService = dpService; - } - - public Object execute(CommandSession session) throws Exception { - DataPoint dp = dpService.get( Long.valueOf( id ) ); - dp.setName( name ); - dpService.update( dp ); - return null; - } - -} diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/entity/DataPoint.java b/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/entity/DataPoint.java deleted file mode 100644 index 2e5ef72422..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/java/org/hibernate/osgitest/entity/DataPoint.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * JBoss, Home of Professional Open Source - * Copyright 2013 Red Hat Inc. and/or its affiliates and other contributors - * as indicated by the @authors tag. All rights reserved. - * See the copyright.txt in the distribution for a - * full listing of individual contributors. - * - * This copyrighted material is made available to anyone wishing to use, - * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU Lesser General Public License, v. 2.1. - * This program is distributed in the hope that it will be useful, but WITHOUT A - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - * You should have received a copy of the GNU Lesser General Public License, - * v.2.1 along with this distribution; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ -package org.hibernate.osgitest.entity; - -import java.io.Serializable; - -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; - -import org.hibernate.envers.Audited; - -/** - * @author Brett Meyer - */ -@Entity -@Audited -public class DataPoint implements Serializable { - @Id - @GeneratedValue - private long id; - - private String 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; - } -} diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/resources/OSGI-INF/blueprint/blueprint.xml deleted file mode 100644 index f62626a14d..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/resources/OSGI-INF/blueprint/blueprint.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/resources/ehcache.xml b/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/resources/ehcache.xml deleted file mode 100644 index 52d198d65f..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/resources/ehcache.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - --> - - - - diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/resources/hibernate.cfg.xml b/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/resources/hibernate.cfg.xml deleted file mode 100644 index 7f9f2380c9..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/resources/hibernate.cfg.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - org.h2.Driver - jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;MVCC=TRUE - sa - - org.hibernate.dialect.H2Dialect - create-drop - - - - - - - - - - - - - diff --git a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/resources/pool-one.properties b/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/resources/pool-one.properties deleted file mode 100644 index 7e1c4cf1ba..0000000000 --- a/documentation/src/main/docbook/quickstart/tutorials/osgi/unmanaged-native/src/main/resources/pool-one.properties +++ /dev/null @@ -1,13 +0,0 @@ -# -# Hibernate, Relational Persistence for Idiomatic Java -# -# License: GNU Lesser General Public License (LGPL), version 2.1 or later. -# See the lgpl.txt file in the root directory or . -# -jdbc-0.proxool.alias=pool-one -jdbc-0.proxool.driver-url=jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;MVCC=TRUE -jdbc-0.proxool.driver-class=org.h2.Driver -jdbc-0.user=sa -jdbc-0.password= -jdbc-0.proxool.maximum-connection-count=2 -jdbc-0.proxool.house-keeping-test-sql=select CURRENT_DATE \ No newline at end of file