deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From johndam...@apache.org
Subject svn commit: r1745102 - in /deltaspike/site/trunk/content/documentation: configuration.html data.html
Date Mon, 23 May 2016 00:28:34 GMT
Author: johndament
Date: Mon May 23 00:28:33 2016
New Revision: 1745102

URL: http://svn.apache.org/viewvc?rev=1745102&view=rev
Log:
Site checkin for project Apache DeltaSpike Documentation

Modified:
    deltaspike/site/trunk/content/documentation/configuration.html
    deltaspike/site/trunk/content/documentation/data.html

Modified: deltaspike/site/trunk/content/documentation/configuration.html
URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/documentation/configuration.html?rev=1745102&r1=1745101&r2=1745102&view=diff
==============================================================================
--- deltaspike/site/trunk/content/documentation/configuration.html (original)
+++ deltaspike/site/trunk/content/documentation/configuration.html Mon May 23 00:28:33 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: deltaspike/site/trunk/content/documentation/data.html
URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/documentation/data.html?rev=1745102&r1=1745101&r2=1745102&view=diff
==============================================================================
--- deltaspike/site/trunk/content/documentation/data.html (original)
+++ deltaspike/site/trunk/content/documentation/data.html Mon May 23 00:28:33 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&lt;Person, <span class="predefined-type">Long</span>&gt;
+{
+
+    <span class="predefined-type">List</span>&lt;Person&gt; findFirst2ByLastNameOrderByAgeAscLastNameDesc(<span
class="predefined-type">String</span> lastName);
+
+    <span class="predefined-type">List</span>&lt;Person&gt; 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>



Mime
View raw message