Permalink
Browse files

DATAJPA-251 - Polished reference documentation.

  • Loading branch information...
1 parent 918099e commit 3b2818df9a210494ee8fd4f723260b6dfec6c0e1 @olivergierke olivergierke committed Sep 17, 2012
Showing with 11 additions and 12 deletions.
  1. +3 −4 src/docbkx/appendix/faq.xml
  2. +8 −8 src/docbkx/reference/jpa.xml
View
7 src/docbkx/appendix/faq.xml
@@ -29,7 +29,7 @@
<aop:config>
<aop:advisor advice-ref="customizableTraceInterceptor"
- pointcut="execution(public * org.sfw.data.jpa.repository.JpaRepository+.*(..))"/>
+ pointcut="execution(public * org.springframework.data.jpa.repository.JpaRepository+.*(..))"/>
&lt;/aop:config&gt;</programlisting>
</answer>
</qandaentry>
@@ -62,8 +62,7 @@
<programlisting language="xml">&lt;bean class="com.acme.YourDaoBasedOnHibernateDaoSupport"&gt;
&lt;property name="sessionFactory"&gt;
- &lt;bean factory-bean="entityManagerFactory"
- factory-method="getSessionFactory" /&gt;
+ &lt;bean factory-bean="entityManagerFactory" factory-method="getSessionFactory" /&gt;
&lt;/property&gt;
&lt;/bean&gt;</programlisting>
</example>
@@ -89,4 +88,4 @@
</qandaentry>
</qandadiv>
</qandaset>
-</appendix>
+</appendix>
View
16 src/docbkx/reference/jpa.xml
@@ -98,7 +98,7 @@
<para>The Spring Data JPA repositories support cannot only be activated
through an XML namespace but also using an annotation through
- JavaConfig. </para>
+ JavaConfig.</para>
<example id="id2371211_05-jpa">
<title>Spring Data JPA repositories using JavaConfig</title>
@@ -319,16 +319,16 @@ class ApplicationConfig {
<entry><code>findByFirstnameStartingWith</code></entry>
<entry><code>… where x.firstname like ?1</code> (parameter
- bound with prepended <code>%</code>)</entry>
+ bound with appended <code>%</code>)</entry>
</row>
<row>
- <entry><code>ngWith</code></entry>
+ <entry><code>EndingWith</code></entry>
<entry><code>findByFirstnameEndingWith</code></entry>
<entry><code>… where x.firstname like ?1</code> (parameter
- bound with appended <code>%</code>)</entry>
+ bound with prepended <code>%</code>)</entry>
</row>
<row>
@@ -641,10 +641,10 @@ int setFixedFirstnameFor(String firstname, String lastname);</programlisting>
<para>The additional interface carries methods that allow you to execute
<interfacename>Specification</interfacename>s in a variety of ways.</para>
- <para>For example, the <code>readAll</code> method will return all
+ <para>For example, the <code>findAll</code> method will return all
entities that match the specification:</para>
- <programlisting language="java">List&lt;T&gt; readAll(Specification&lt;T&gt; spec);</programlisting>
+ <programlisting language="java">List&lt;T&gt; findAll(Specification&lt;T&gt; spec);</programlisting>
<para>The <interfacename>Specification</interfacename> interface is as
follows:</para>
@@ -716,7 +716,7 @@ int setFixedFirstnameFor(String firstname, String lastname);</programlisting>
<title>Combined Specifications</title>
<para><programlisting language="java">MonetaryAmount amount = new MonetaryAmount(200.0, Currencies.DOLLAR);
-List&lt;Customer&gt; customers = customerRepository.readAll(
+List&lt;Customer&gt; customers = customerRepository.findAll(
where(isLongTermCustomer()).or(hasSalesOfMoreThan(amount)));</programlisting>As
you can see, <classname>Specifications</classname> offers some glue-code
methods to chain and combine
@@ -784,7 +784,7 @@ class UserManagementImpl implements UserManagement {
Role role = roleRepository.findByName(roleName);
- for (User user : userRepository.readAll()) {
+ for (User user : userRepository.findAll()) {
user.addRole(role);
userRepository.save(user);
}

0 comments on commit 3b2818d

Please sign in to comment.