Minor fixes to common reference documentation.
- fixed some section ids in repository configuration - added namespace reference file
This commit is contained in:
@@ -176,7 +176,8 @@ Page<User> users = repository.findAll(new PageRequest(1, 20);</programlist
|
||||
|
||||
<programlisting language="java">public class SomeClient {
|
||||
|
||||
@Autowired private PersonRepoyitory repository;
|
||||
@Autowired
|
||||
private PersonRepoyitory repository;
|
||||
|
||||
public void doSomething() {
|
||||
List<Person> persons = repository.findByLastname("Matthews");
|
||||
@@ -202,7 +203,7 @@ Page<User> users = repository.findAll(new PageRequest(1, 20);</programlist
|
||||
<section>
|
||||
<title>Defining query methods</title>
|
||||
|
||||
<section>
|
||||
<section id="repositories.query-methods.query-lookup-strategies">
|
||||
<title>Query lookup strategies</title>
|
||||
|
||||
<para>The next thing we have to discuss is the definition of query
|
||||
@@ -282,11 +283,13 @@ Page<User> users = repository.findAll(new PageRequest(1, 20);</programlist
|
||||
traversals combined with operators that can be concatenated. As you
|
||||
can see in the example you can combine property expressions with And
|
||||
and Or. Beyond that you will get support for various operators like
|
||||
Between, LessThan, GreaterThan, Like for the property expressions. As
|
||||
the operators supported can vary from datastore to datastore please
|
||||
consult the according part of the reference documentation.</para>
|
||||
<literal>Between</literal>, <literal>LessThan</literal>,
|
||||
<literal>GreaterThan</literal>, <literal>Like</literal> for the
|
||||
property expressions. As the operators supported can vary from
|
||||
datastore to datastore please consult the according part of the
|
||||
reference documentation.</para>
|
||||
|
||||
<section>
|
||||
<section id="repositories.query-methods.property-expressions">
|
||||
<title>Property expressions</title>
|
||||
|
||||
<para>Property expressions can just refer to a direct property of
|
||||
@@ -471,7 +474,7 @@ List<User> findByLastname(String lastname, Pageable pageable);</programlis
|
||||
<title>Standalone usage of repository factory</title>
|
||||
|
||||
<programlisting>RepositoryFactorySupport factory = … // Instantiate factory here
|
||||
UserRepository repository = factory.getRepository(UserRepository.class</programlisting>
|
||||
UserRepository repository = factory.getRepository(UserRepository.class);</programlisting>
|
||||
</example>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
104
src/docbkx/repository-namespace-reference.xml
Normal file
104
src/docbkx/repository-namespace-reference.xml
Normal file
@@ -0,0 +1,104 @@
|
||||
<?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="namespace-reference">
|
||||
<title>Namespace reference</title>
|
||||
|
||||
<section id="namespace-dao-config">
|
||||
<title>The <code><repositories /></code> element</title>
|
||||
|
||||
<para>The <code><repositories /></code> element acts as container
|
||||
for <code><repository /></code> elements or can be left empty to
|
||||
trigger auto detection<footnote>
|
||||
<para>see <xref linkend="config.autoconfig" /></para>
|
||||
</footnote> of repository instances. Attributes defined for
|
||||
<code><repositories /></code> act are propagated to contained
|
||||
<code><repository /></code> elements but can be overridden of
|
||||
course.</para>
|
||||
|
||||
<table>
|
||||
<title>Attributes</title>
|
||||
|
||||
<tgroup cols="2">
|
||||
<colspec colwidth="1*" />
|
||||
|
||||
<colspec colwidth="2*" />
|
||||
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Name</entry>
|
||||
|
||||
<entry>Description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><code>base-package</code></entry>
|
||||
|
||||
<entry>Defines the package to be used to be scanned for repository
|
||||
interfaces extending <interfacename>*Repository</interfacename>
|
||||
(actual interface is determined by specific Spring Data module) in
|
||||
auto detection mode. All packages below the configured package
|
||||
will be scanned, too. In auto configuration mode (no nested
|
||||
<code><repository /></code> elements) wildcards are also
|
||||
allowed.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><code>repository-impl-postfix</code></entry>
|
||||
|
||||
<entry>Defines the postfix to autodetect custom repository
|
||||
implementations. Classes whose names end with the configured
|
||||
postfix will be considered as candidates. Defaults to
|
||||
<code>Impl</code>.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><code>query-lookup-strategy</code></entry>
|
||||
|
||||
<entry>Determines the strategy to be used to create finder
|
||||
queries. See <xref linkend="sample-app.finders.strategies" /> for
|
||||
details. Defaults to <code>create-if-not-found</code>.</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<section id="namespace-dao">
|
||||
<title>The <code><repository /></code> element</title>
|
||||
|
||||
<para>The <code><repository /></code> element can contain all
|
||||
attributes of <code><repositories /></code> except
|
||||
<code>base-package</code>. This will result in overriding the values
|
||||
configured in the surrounding <code><repositories /></code> element.
|
||||
Thus here we will only document extended attributes.</para>
|
||||
|
||||
<table>
|
||||
<title>Attributes</title>
|
||||
|
||||
<tgroup cols="2">
|
||||
<colspec colwidth="1*" />
|
||||
|
||||
<colspec colwidth="2*" />
|
||||
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><code>id</code></entry>
|
||||
|
||||
<entry>Defines the id of the bean the repository instance will be
|
||||
registered under as well as the repository interface name.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><code>custom-impl-ref</code></entry>
|
||||
|
||||
<entry>Defines a reference to a custom repository implementation
|
||||
bean.</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</section>
|
||||
</appendix>
|
||||
Reference in New Issue
Block a user