-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DATAJPA-3 - Initial port of Hades reference documentation.
- created Docbook setup (copied from Document project) - split up Hades documentation into parts and left out what's currently not relevant (extensions, IDE plugin) - removed sample application part for now - clearly separated documentation of the general repository implementation from JPA specifics (use the one from Spring Data Commons) - extracted general namespace configuration into Spring Data Commons - updated project metadata (repositories, source repo, homepage)
- Loading branch information
Showing
62 changed files
with
3,821 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" | ||
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> | ||
<appendix id="faq"> | ||
<title>Frequently asked questions</title> | ||
|
||
<qandaset> | ||
<qandadiv> | ||
<title>Common</title> | ||
|
||
<qandaentry> | ||
<question> | ||
<para>I'd like to get more detailled logging information on what | ||
methods are called inside | ||
<interfacename>JpaRepository</interfacename>, e.g. How can I gain | ||
them?</para> | ||
</question> | ||
|
||
<answer> | ||
<para>You can make use of | ||
<classname>CustomizableTraceInterceptor</classname> provided by | ||
Spring:</para> | ||
|
||
<programlisting language="xml"><bean id="customizableTraceInterceptor" class=" | ||
org.springframework.aop.interceptor.CustomizableTraceInterceptor"> | ||
<property name="enterMessage" value="Entering $[methodName]($[arguments])"/> | ||
<property name="exitMessage" value="Leaving $[methodName](): $[returnValue]"/> | ||
</bean> | ||
|
||
<aop:config> | ||
<aop:advisor advice-ref="customizableTraceInterceptor" | ||
pointcut="execution(public * org.sfw.data.jpa.repository.JpaRepository+.*(..))"/> | ||
</aop:config></programlisting> | ||
</answer> | ||
</qandaentry> | ||
</qandadiv> | ||
|
||
<qandadiv> | ||
<title>Infrastructure</title> | ||
|
||
<qandaentry> | ||
<question> | ||
<para>Currently I have implemented a repository layer based on | ||
<classname>HibernateDaoSupport</classname>. I create a | ||
<classname>SessionFactory</classname> by using Spring's | ||
<classname>AnnotationSessionFactoryBean</classname>. How do I get | ||
Hades DAOs working in this environment.</para> | ||
</question> | ||
|
||
<answer> | ||
<para>You have to replace | ||
<classname>AnnotationSessionFactoryBean</classname> with the | ||
<classname>LocalContainerEntityManagerFactoryBean</classname>. | ||
Supposed you have registered it under | ||
<code>entityManagerFactory</code> you can reference it in you | ||
repositories based on <classname>HibernateDaoSupport</classname> as | ||
follows:</para> | ||
|
||
<example> | ||
<title>Looking up a SessionFactory from an | ||
HibernateEntityManagerFactory</title> | ||
|
||
<programlisting language="xml"><bean class="com.acme.YourDaoBasedOnHibernateDaoSupport"> | ||
<property name="sessionFactory"> | ||
<bean factory-bean="entityManagerFactory" | ||
factory-method="getSessionFactory" /> | ||
</property> | ||
</bean></programlisting> | ||
</example> | ||
</answer> | ||
</qandaentry> | ||
</qandadiv> | ||
|
||
<qandadiv> | ||
<title>Auditing</title> | ||
|
||
<qandaentry> | ||
<question> | ||
<para>I want to use Spring Data JPA auditing capabilities but have | ||
my database already set up to set modification and creation date on | ||
entities. How to prevent Hades to set the date | ||
programmatically.</para> | ||
</question> | ||
|
||
<answer> | ||
<para>Just use the <code>set-dates</code> attribute of the | ||
<code>auditing</code> namespace element to false.</para> | ||
</answer> | ||
</qandaentry> | ||
</qandadiv> | ||
</qandaset> | ||
</appendix> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" | ||
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> | ||
<glossary id="glossary"> | ||
<glossdiv> | ||
<title>A</title> | ||
|
||
<glossentry> | ||
<glossterm>AOP</glossterm> | ||
|
||
<glossdef> | ||
<para>Aspect oriented programming</para> | ||
</glossdef> | ||
</glossentry> | ||
</glossdiv> | ||
|
||
<glossdiv> | ||
<title>C</title> | ||
|
||
<glossentry> | ||
<glossterm>Commons DBCP</glossterm> | ||
|
||
<glossdef> | ||
<para>Commons DataBase Connection Pools - Library of the Apache | ||
foundation offering pooling implementations of the | ||
<interfacename>DataSource</interfacename> interface.</para> | ||
</glossdef> | ||
</glossentry> | ||
|
||
<glossentry> | ||
<glossterm>CRUD</glossterm> | ||
|
||
<glossdef> | ||
<para>Create, Read, Update, Delete - Basic persistence | ||
operations</para> | ||
</glossdef> | ||
</glossentry> | ||
</glossdiv> | ||
|
||
<glossdiv> | ||
<title>D</title> | ||
|
||
<glossentry> | ||
<glossterm>DAO</glossterm> | ||
|
||
<glossdef> | ||
<para>Data Access Object - Pattern to separate persisting logic from | ||
the object to be persisted</para> | ||
</glossdef> | ||
</glossentry> | ||
|
||
<glossentry> | ||
<glossterm>Dependency Injection</glossterm> | ||
|
||
<glossdef> | ||
<para>Pattern to hand a component's dependency to the component from | ||
outside, freeing the component to lookup the dependant itself. For | ||
more information see <ulink | ||
url="http://en.wikipedia.org/wiki/Dependency_Injection">http://en.wikipedia.org/wiki/Dependency_Injection</ulink>.</para> | ||
</glossdef> | ||
</glossentry> | ||
</glossdiv> | ||
|
||
<glossdiv> | ||
<title>E</title> | ||
|
||
<glossentry> | ||
<glossterm>EclipseLink</glossterm> | ||
|
||
<glossdef> | ||
<para>Object relational mapper implementing JPA - <ulink | ||
url="http://www.eclipselink.org">http://www.eclipselink.org</ulink></para> | ||
</glossdef> | ||
</glossentry> | ||
</glossdiv> | ||
|
||
<glossdiv> | ||
<title>H</title> | ||
|
||
<glossentry> | ||
<glossterm>Hibernate</glossterm> | ||
|
||
<glossdef> | ||
<para>Object relational mapper implementing JPA - <ulink | ||
url="http://www.hibernate.org">http://www.hibernate.org</ulink></para> | ||
</glossdef> | ||
</glossentry> | ||
</glossdiv> | ||
|
||
<glossdiv> | ||
<title>J</title> | ||
|
||
<glossentry> | ||
<glossterm>JPA</glossterm> | ||
|
||
<glossdef> | ||
<para>Java Persistence Api</para> | ||
</glossdef> | ||
</glossentry> | ||
</glossdiv> | ||
|
||
<glossdiv> | ||
<title>S</title> | ||
|
||
<glossentry> | ||
<glossterm>Spring</glossterm> | ||
|
||
<glossdef> | ||
<para>Java application framework - <ulink | ||
url="http://www.springframework.org">http://www.springframework.org</ulink></para> | ||
</glossdef> | ||
</glossentry> | ||
</glossdiv> | ||
</glossary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" | ||
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> | ||
<book xmlns:xi="http://www.w3.org/2001/XInclude"> | ||
<bookinfo> | ||
<title>Spring Data JPA - Reference Documentation</title> | ||
|
||
<releaseinfo>1.0.0.BUILD-SNAPSHOT</releaseinfo> | ||
|
||
<authorgroup> | ||
<author> | ||
<firstname>Oliver</firstname> | ||
|
||
<surname>Gierke</surname> | ||
|
||
<affiliation> | ||
<jobtitle>Senior Consultant</jobtitle> | ||
|
||
<orgname>SpringSource - a division of VMware</orgname> | ||
</affiliation> | ||
|
||
<email>ogierke@vmware.com</email> | ||
</author> | ||
</authorgroup> | ||
|
||
<legalnotice> | ||
<para>Copies of this document may be made for your own use and for | ||
distribution to others, provided that you do not charge any fee for such | ||
copies and further provided that each copy contains this Copyright | ||
Notice, whether distributed in print or electronically.</para> | ||
</legalnotice> | ||
|
||
<pubdate /> | ||
|
||
<copyright> | ||
<year>2008-2011</year> | ||
|
||
<holder>The original authors</holder> | ||
</copyright> | ||
|
||
<revhistory> | ||
<revision> | ||
<date>09.02.2011</date> | ||
|
||
<author> | ||
<firstname>Oliver</firstname> | ||
|
||
<surname>Gierke</surname> | ||
</author> | ||
|
||
<revremark>Initial port from Hades documentation</revremark> | ||
</revision> | ||
</revhistory> | ||
</bookinfo> | ||
|
||
<toc /> | ||
|
||
<xi:include href="preface.xml" /> | ||
|
||
<part id="reference"> | ||
<title>Reference Documentation</title> | ||
|
||
<xi:include href="https://github.com/SpringSource/spring-data-commons/raw/master/src/docbkx/repositories.xml" /> | ||
|
||
<xi:include href="reference/jpa.xml" /> | ||
</part> | ||
|
||
<part id="appendix"> | ||
<title>Appendix</title> | ||
|
||
<xi:include href="https://github.com/SpringSource/spring-data-commons/raw/master/src/docbkx/repository-namespace-reference.xml" /> | ||
|
||
<xi:include href="appendix/faq.xml" /> | ||
|
||
<xi:include href="appendix/glossary.xml" /> | ||
</part> | ||
</book> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE preface PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" | ||
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> | ||
<preface id="preface"> | ||
<title>Preface</title> | ||
|
||
<section id="project"> | ||
<title>Project metadata</title> | ||
|
||
<itemizedlist spacing="compact"> | ||
<listitem> | ||
<para>Version control - <ulink | ||
url="http://git.synyx.org/hades.git">git://github.com/SpringSource/spring-data-jpa.git</ulink></para> | ||
</listitem> | ||
|
||
<listitem> | ||
<para>Bugtracker - <ulink | ||
url="http://hades.synyx.org">https://jira.springsource.org/browse/DATAJPA</ulink></para> | ||
</listitem> | ||
|
||
<listitem> | ||
<para>Release repository - <ulink | ||
url="http://repo2.maven.org/maven2/org/synyx/hades"><ulink | ||
url="http://maven.springframework.org/release">http://maven.springframework.org/release</ulink></ulink></para> | ||
</listitem> | ||
|
||
<listitem> | ||
<para>Milestone repsitory - <ulink | ||
url="http://maven.springframework.org/milestone">http://maven.springframework.org/milestone</ulink></para> | ||
</listitem> | ||
|
||
<listitem> | ||
<para>Snapshot repsitory - <ulink | ||
url="http://maven.springframework.org/snapshot">http://maven.springframework.org/snapshot</ulink></para> | ||
</listitem> | ||
</itemizedlist> | ||
</section> | ||
</preface> |
Oops, something went wrong.