You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltaspike.apache.org by bu...@apache.org on 2016/05/23 00:29:25 UTC
svn commit: r988911 - in /websites/staging/deltaspike/trunk/content: ./
documentation/configuration.html documentation/data.html
Author: buildbot
Date: Mon May 23 00:29:24 2016
New Revision: 988911
Log:
Staging update by buildbot for deltaspike
Modified:
websites/staging/deltaspike/trunk/content/ (props changed)
websites/staging/deltaspike/trunk/content/documentation/configuration.html
websites/staging/deltaspike/trunk/content/documentation/data.html
Propchange: websites/staging/deltaspike/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Mon May 23 00:29:24 2016
@@ -1 +1 @@
-1744440
+1745102
Modified: websites/staging/deltaspike/trunk/content/documentation/configuration.html
==============================================================================
--- websites/staging/deltaspike/trunk/content/documentation/configuration.html (original)
+++ websites/staging/deltaspike/trunk/content/documentation/configuration.html Mon May 23 00:29:24 2016
@@ -479,6 +479,7 @@ cached in the ConfigResolver but might b
This makes the overall calculation a bit slower, but allows for values
to change dynamically if someone likes to for example implement a
<code>JmxConfigSource</code> (not yet part of DeltaSpike, but easily implementable).
+You can also use the <a href="#DynamicReloading">TypedResolver</a> with the <code>cacheFor(TimeUnit, long)</code> setting to cache the resolved values on the caller side.
</td>
</tr>
</table>
@@ -617,6 +618,19 @@ connecTo( urlConfig.getValue() );</code>
<p>The sample above will log any value changes in the configuration (<code>logChanges(true)</code>) and internally cache the configured value for 5 minutes (<code>cacheFor(TimeUnit.MINUTES, 5)</code>).
Only after that time the configured value will get evaluate again.</p>
</div>
+<div class="admonitionblock tip">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-tip" title="Tip"></i>
+</td>
+<td class="content">
+Note that the 'cache' is only held within the very TypedResolver instance.
+If you use different <code>TypedResolver</code> instances (e.g. in different classes) then you might get different cache timeouts.
+</td>
+</tr>
+</table>
+</div>
</div>
</div>
<div class="sect2">
Modified: websites/staging/deltaspike/trunk/content/documentation/data.html
==============================================================================
--- websites/staging/deltaspike/trunk/content/documentation/data.html (original)
+++ websites/staging/deltaspike/trunk/content/documentation/data.html Mon May 23 00:29:24 2016
@@ -946,6 +946,27 @@ you will notice early in case you have a
</div>
</div>
<div class="sect2">
+<h3 id="_query_limits">Query Limits</h3>
+<div class="paragraph">
+<p>Starting with Apache DeltaSpike 1.6.2, you can apply query limits using method
+expressions. They can be applied using <code>First</code> or <code>Top</code> keywords, in a method
+like this</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="java"><span class="annotation">@Repository</span>
+<span class="directive">public</span> <span class="type">interface</span> <span class="class">PersonRepository</span> <span class="directive">extends</span> EntityRepository<Person, <span class="predefined-type">Long</span>>
+{
+
+ <span class="predefined-type">List</span><Person> findFirst2ByLastNameOrderByAgeAscLastNameDesc(<span class="predefined-type">String</span> lastName);
+
+ <span class="predefined-type">List</span><Person> findTop2ByLastNameOrderByAgeAscLastNameDesc(<span class="predefined-type">String</span> lastName);
+
+}</code></pre>
+</div>
+</div>
+</div>
+<div class="sect2">
<h3 id="_nested_properties">Nested Properties</h3>
<div class="paragraph">
<p>To create a comparison on a nested property, the traversal parts can be
@@ -2237,6 +2258,7 @@ provider when persisting / updating the
<ul class="sectlevel2">
<li><a href="#_using_method_expressions">Using Method Expressions</a></li>
<li><a href="#_query_ordering">Query Ordering</a></li>
+<li><a href="#_query_limits">Query Limits</a></li>
<li><a href="#_nested_properties">Nested Properties</a></li>
<li><a href="#_query_options">Query Options</a></li>
<li><a href="#_method_prefix">Method Prefix</a></li>