cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r843997 - in /websites/production/cxf/content: cache/docs.pageCache docs/jax-rs-advanced-features.html docs/jax-rs-filters.html
Date Thu, 27 Dec 2012 16:48:10 GMT
Author: buildbot
Date: Thu Dec 27 16:48:09 2012
New Revision: 843997

Log:
Production update by buildbot for cxf

Modified:
    websites/production/cxf/content/cache/docs.pageCache
    websites/production/cxf/content/docs/jax-rs-advanced-features.html
    websites/production/cxf/content/docs/jax-rs-filters.html

Modified: websites/production/cxf/content/cache/docs.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/cxf/content/docs/jax-rs-advanced-features.html
==============================================================================
--- websites/production/cxf/content/docs/jax-rs-advanced-features.html (original)
+++ websites/production/cxf/content/docs/jax-rs-advanced-features.html Thu Dec 27 16:48:09
2012
@@ -124,7 +124,7 @@ Apache CXF -- JAX-RS Advanced Features
 <div id="ConfluenceContent"><p><span style="font-size:2em;font-weight:bold">JAX-RS
: Advanced Features</span></p>
 
 <div>
-<ul><li><a shape="rect" href="#JAX-RSAdvancedFeatures-JMSSupport">JMS Support</a></li><ul><li><a
shape="rect" href="#JAX-RSAdvancedFeatures-Endpoints">Endpoints</a></li><li><a
shape="rect" href="#JAX-RSAdvancedFeatures-Client">Client</a></li></ul><li><a
shape="rect" href="#JAX-RSAdvancedFeatures-FIQLsearchqueries">FIQL search queries</a></li><ul><li><a
shape="rect" href="#JAX-RSAdvancedFeatures-Introduction">Introduction</a></li><li><a
shape="rect" href="#JAX-RSAdvancedFeatures-WhentouseFIQL">When to use FIQL</a></li><li><a
shape="rect" href="#JAX-RSAdvancedFeatures-DependenciesandConfiguration">Dependencies and
Configuration</a></li><li><a shape="rect" href="#JAX-RSAdvancedFeatures-WorkingwithFIQLqueries">Working
with FIQL queries</a></li><li><a shape="rect" href="#JAX-RSAdvancedFeatures-CapturingFIQLqueries">Capturing
FIQL queries</a></li><ul><li><a shape="rect" href="#JAX-RSAdvancedFeatures-Mappingofquerypropertiestobeanproperties">Mapping
of query properties to bean prop
 erties</a></li><li><a shape="rect" href="#JAX-RSAdvancedFeatures-Parserproperties">Parser
properties</a></li></ul><li><a shape="rect" href="#JAX-RSAdvancedFeatures-Mappingofquerypropertiestocolumn%2Ffieldnames">Mapping
of query properties to column/field names</a></li><li><a shape="rect"
href="#JAX-RSAdvancedFeatures-SearchBean">SearchBean</a></li><li><a
shape="rect" href="#JAX-RSAdvancedFeatures-ConvertingFIQLqueries">Converting FIQL queries</a></li><ul><li><a
shape="rect" href="#JAX-RSAdvancedFeatures-SQL">SQL</a></li><li><a
shape="rect" href="#JAX-RSAdvancedFeatures-JPA2.0">JPA 2.0</a></li><li><a
shape="rect" href="#JAX-RSAdvancedFeatures-Lucene">Lucene</a></li><li><a
shape="rect" href="#JAX-RSAdvancedFeatures-LDAP">LDAP</a></li><li><a
shape="rect" href="#JAX-RSAdvancedFeatures-Customvisitors">Custom visitors</a></li><ul><li><a
shape="rect" href="#JAX-RSAdvancedFeatures-Untypedconverters">Untyped converters</a></li><li><a
shape="rect" href="#JAX-RSAdvancedFeatures-Typedco
 nverters">Typed converters</a></li><li><a shape="rect" href="#JAX-RSAdvancedFeatures-Customparsing">Custom
parsing</a></li></ul></ul><li><a shape="rect" href="#JAX-RSAdvancedFeatures-ConvertingFIQLquerieswithQueryContext">Converting
FIQL queries with QueryContext</a></li><li><a shape="rect" href="#JAX-RSAdvancedFeatures-SearchExpressionsinURIPathsegments">Search
Expressions in URI Path segments</a></li><li><a shape="rect" href="#JAX-RSAdvancedFeatures-Queriesinvolvingmultipleentities">Queries
involving multiple entities</a></li><ul><li><a shape="rect" href="#JAX-RSAdvancedFeatures-Basicqueries">Basic
queries</a></li><li><a shape="rect" href="#JAX-RSAdvancedFeatures-Complexqueries">Complex
queries</a></li></ul><li><a shape="rect" href="#JAX-RSAdvancedFeatures-BuildingFIQLqueries">Building
FIQL queries</a></li><li><a shape="rect" href="#JAX-RSAdvancedFeatures-Usingdatesinqueries">Using
dates in queries</a></li><li><a shape="rect" href="#JAX-RSAdvancedFeatures-Alternativequeryl
 anguages">Alternative query languages</a></li></ul><li><a shape="rect"
href="#JAX-RSAdvancedFeatures-Onewayinvocations">Oneway invocations</a></li><li><a
shape="rect" href="#JAX-RSAdvancedFeatures-SupportforContinuations">Support for Continuations</a></li><li><a
shape="rect" href="#JAX-RSAdvancedFeatures-Serversidecaching">Server-side caching</a></li><li><a
shape="rect" href="#JAX-RSAdvancedFeatures-RESTfulserviceswithoutannotations">RESTful services
without annotations</a></li><ul><li><a shape="rect" href="#JAX-RSAdvancedFeatures-Configuration">Configuration</a></li></ul></ul></div>
+<ul><li><a shape="rect" href="#JAX-RSAdvancedFeatures-JMSSupport">JMS Support</a></li><ul><li><a
shape="rect" href="#JAX-RSAdvancedFeatures-Endpoints">Endpoints</a></li><li><a
shape="rect" href="#JAX-RSAdvancedFeatures-Client">Client</a></li></ul><li><a
shape="rect" href="#JAX-RSAdvancedFeatures-FIQLsearchqueries">FIQL search queries</a></li><ul><li><a
shape="rect" href="#JAX-RSAdvancedFeatures-Introduction">Introduction</a></li><li><a
shape="rect" href="#JAX-RSAdvancedFeatures-WhentouseFIQL">When to use FIQL</a></li><li><a
shape="rect" href="#JAX-RSAdvancedFeatures-DependenciesandConfiguration">Dependencies and
Configuration</a></li><li><a shape="rect" href="#JAX-RSAdvancedFeatures-WorkingwithFIQLqueries">Working
with FIQL queries</a></li><li><a shape="rect" href="#JAX-RSAdvancedFeatures-CapturingFIQLqueries">Capturing
FIQL queries</a></li><ul><li><a shape="rect" href="#JAX-RSAdvancedFeatures-Mappingofquerypropertiestobeanproperties">Mapping
of query properties to bean prop
 erties</a></li><li><a shape="rect" href="#JAX-RSAdvancedFeatures-Parserproperties">Parser
properties</a></li></ul><li><a shape="rect" href="#JAX-RSAdvancedFeatures-Mappingofquerypropertiestocolumn%2Ffieldnames">Mapping
of query properties to column/field names</a></li><li><a shape="rect"
href="#JAX-RSAdvancedFeatures-SearchBean">SearchBean</a></li><li><a
shape="rect" href="#JAX-RSAdvancedFeatures-ConvertingFIQLqueries">Converting FIQL queries</a></li><ul><li><a
shape="rect" href="#JAX-RSAdvancedFeatures-SQL">SQL</a></li><li><a
shape="rect" href="#JAX-RSAdvancedFeatures-JPA2.0">JPA 2.0</a></li><ul><li><a
shape="rect" href="#JAX-RSAdvancedFeatures-Countexpressions">Count expressions</a></li></ul><li><a
shape="rect" href="#JAX-RSAdvancedFeatures-Lucene">Lucene</a></li><li><a
shape="rect" href="#JAX-RSAdvancedFeatures-LDAP">LDAP</a></li><li><a
shape="rect" href="#JAX-RSAdvancedFeatures-Customvisitors">Custom visitors</a></li><ul><li><a
shape="rect" href="#JAX-RSAdvancedFeatures-
 Untypedconverters">Untyped converters</a></li><li><a shape="rect"
href="#JAX-RSAdvancedFeatures-Typedconverters">Typed converters</a></li><li><a
shape="rect" href="#JAX-RSAdvancedFeatures-Customparsing">Custom parsing</a></li></ul></ul><li><a
shape="rect" href="#JAX-RSAdvancedFeatures-ConvertingFIQLquerieswithQueryContext">Converting
FIQL queries with QueryContext</a></li><li><a shape="rect" href="#JAX-RSAdvancedFeatures-SearchExpressionsinURIPathsegments">Search
Expressions in URI Path segments</a></li><li><a shape="rect" href="#JAX-RSAdvancedFeatures-Queriesinvolvingmultipleentities">Queries
involving multiple entities</a></li><ul><li><a shape="rect" href="#JAX-RSAdvancedFeatures-Basicqueries">Basic
queries</a></li><li><a shape="rect" href="#JAX-RSAdvancedFeatures-Complexqueries">Complex
queries</a></li></ul><li><a shape="rect" href="#JAX-RSAdvancedFeatures-BuildingFIQLqueries">Building
FIQL queries</a></li><li><a shape="rect" href="#JAX-RSAdvancedFeatures-Usingdatesinquer
 ies">Using dates in queries</a></li><li><a shape="rect" href="#JAX-RSAdvancedFeatures-Alternativequerylanguages">Alternative
query languages</a></li></ul><li><a shape="rect" href="#JAX-RSAdvancedFeatures-Onewayinvocations">Oneway
invocations</a></li><li><a shape="rect" href="#JAX-RSAdvancedFeatures-SupportforContinuations">Support
for Continuations</a></li><li><a shape="rect" href="#JAX-RSAdvancedFeatures-Serversidecaching">Server-side
caching</a></li><li><a shape="rect" href="#JAX-RSAdvancedFeatures-RESTfulserviceswithoutannotations">RESTful
services without annotations</a></li><ul><li><a shape="rect" href="#JAX-RSAdvancedFeatures-Configuration">Configuration</a></li></ul></ul></div>
 
 <h1><a shape="rect" name="JAX-RSAdvancedFeatures-JMSSupport"></a>JMS Support</h1>
 
@@ -724,6 +724,37 @@ TypedQuery&lt;Book&gt; query = jpa.getQu
 
 <p>org.apache.cxf.jaxrs.ext.search.jpa.JPALanguageVisitor for converting FIQL expressions
into JPQL expressions have also been introduced.</p>
 
+<h4><a shape="rect" name="JAX-RSAdvancedFeatures-Countexpressions"></a>Count
expressions</h4>
+
+<p>Count expressions are supported at the two levels, </p>
+
+<p>First, one may want to get the count of records matching a given search expression,
this actually can be done by checking the size of the result list:</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+TypedQuery&lt;Book&gt; query = jpa.getQuery();
+<span class="code-keyword">return</span> query.getResultList().size();
+</pre>
+</div></div>
+
+<p>However this can be very inefficient for large number of records, so using a CriteriaBuilder
count operation is recommended, for example:</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+
+SearchCondition&lt;Book&gt; filter = <span class="code-keyword">new</span>
FiqlParser&lt;Book&gt;(Book.class).parse(<span class="code-quote">"reviews.review==good;reviews.authors==Ted"</span>);
+
+JPACriteriaQueryVisitor&lt;Book, <span class="code-object">Long</span>&gt;
jpa = <span class="code-keyword">new</span> JPACriteriaQueryVisitor&lt;Book,
<span class="code-object">Long</span>&gt;(em, Book.class, <span class="code-object">Long</span>.class);
+filter.accept(jpa);
+<span class="code-object">long</span> count = jpa.count();
+
+</pre>
+</div></div>
+
+<p>Second, one may want to find say all the books written by at least two authors or
all the books with no reviews.<br clear="none">
+If a collection entity such as BookReview has a not primitive type, then typing "reviews==0"
is all what is needed, otherwise a count expension needs to be used, for example: "count(authors)=ge=2"
</p>
+
+
 <h3><a shape="rect" name="JAX-RSAdvancedFeatures-Lucene"></a>Lucene</h3>
 
 <p>Mapping of FIQL expressions to Lucene (4.0.0-BETA) Query is supported starting from
CXF 2.7.1.</p>

Modified: websites/production/cxf/content/docs/jax-rs-filters.html
==============================================================================
--- websites/production/cxf/content/docs/jax-rs-filters.html (original)
+++ websites/production/cxf/content/docs/jax-rs-filters.html Thu Dec 27 16:48:09 2012
@@ -238,7 +238,7 @@ message.setContent(<span class="code-key
 
 <h2><a shape="rect" name="JAX-RSFilters-DifferencebetweenJAXRSfiltersandCXFinterceptors"></a>Difference
between JAXRS filters and CXF interceptors</h2>
 
-<p>JAXRS runtime flow is mainly implemented by a pair of 'classical' CXF interceptors.
JAXRSInInterceptor is currently at Phase.PRE_STREAM phase while JAXRSOutInterceptor is currently
at Phase.MARSHAL phase.</p>
+<p>JAXRS runtime flow is mainly implemented by a pair of 'classical' CXF interceptors.
JAXRSInInterceptor is currently at Phase.UNMARSHAL (was at Phase.PRE_STREAM before CXF 2.2.2)
phase while JAXRSOutInterceptor is currently at Phase.MARSHAL phase. </p>
 
 <p>JAXRS filters can be thought of as additional handlers. JAXRSInInterceptor deals
with a chain of RequestHandlers, just before the invocation. JAXRSOutInterceptor deals with
a chain of ResponseHandlers, just after the invocation but before message body writers get
their chance.</p>
 



Mime
View raw message