cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r976175 - in /websites/production/cxf/content: cache/docs.pageCache docs/jax-rs-search.html
Date Tue, 22 Dec 2015 17:47:44 GMT
Author: buildbot
Date: Tue Dec 22 17:47:43 2015
New Revision: 976175

Log:
Production update by buildbot for cxf

Modified:
    websites/production/cxf/content/cache/docs.pageCache
    websites/production/cxf/content/docs/jax-rs-search.html

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

Modified: websites/production/cxf/content/docs/jax-rs-search.html
==============================================================================
--- websites/production/cxf/content/docs/jax-rs-search.html (original)
+++ websites/production/cxf/content/docs/jax-rs-search.html Tue Dec 22 17:47:43 2015
@@ -118,16 +118,16 @@ Apache CXF -- JAX-RS Search
            <!-- Content -->
            <div class="wiki-content">
 <div id="ConfluenceContent"><h1 id="JAX-RSSearch-JAX-RSSearch">JAX-RS Search</h1><p>&#160;</p><p><style
type="text/css">/*<![CDATA[*/
-div.rbtoc1435780188715 {padding: 0px;}
-div.rbtoc1435780188715 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1435780188715 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1450806421014 {padding: 0px;}
+div.rbtoc1450806421014 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1450806421014 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></p><div class="toc-macro rbtoc1435780188715">
+/*]]>*/</style></p><div class="toc-macro rbtoc1450806421014">
 <ul class="toc-indentation"><li><a shape="rect" href="#JAX-RSSearch-JAX-RSSearch">JAX-RS
Search</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#JAX-RSSearch-AdvancedSearchQueries">Advanced
Search Queries</a></li><li><a shape="rect" href="#JAX-RSSearch-SupportedQueryLanguages">Supported
Query Languages</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#JAX-RSSearch-FeedItemQueryLanguage">Feed
Item Query Language</a></li><li><a shape="rect" href="#JAX-RSSearch-OpenDataProtocol">Open
Data Protocol</a></li></ul>
 </li><li><a shape="rect" href="#JAX-RSSearch-Whentouseadvancedqueries.">When
to use advanced queries.</a></li><li><a shape="rect" href="#JAX-RSSearch-DependenciesandConfiguration">Dependencies
and Configuration</a></li><li><a shape="rect" href="#JAX-RSSearch-Workingwiththequeries">Working
with the queries</a></li><li><a shape="rect" href="#JAX-RSSearch-Capturingthequeries">Capturing
the queries</a>
-<ul class="toc-indentation"><li><a shape="rect" href="#JAX-RSSearch-Mappingofquerypropertiestobeanproperties">Mapping
of query properties to bean properties</a></li><li><a shape="rect" href="#JAX-RSSearch-Parserproperties">Parser
properties</a></li></ul>
+<ul class="toc-indentation"><li><a shape="rect" href="#JAX-RSSearch-Mappingofquerypropertiestobeanproperties">Mapping
of query properties to bean properties</a></li><li><a shape="rect" href="#JAX-RSSearch-Dealingwithmistypedpropertynames">Dealing
with mistyped property names</a></li><li><a shape="rect" href="#JAX-RSSearch-Parserproperties">Parser
properties</a></li></ul>
 </li><li><a shape="rect" href="#JAX-RSSearch-Mappingofquerypropertiestocolumn/fieldnames">Mapping
of query properties to column/field names</a></li><li><a shape="rect"
href="#JAX-RSSearch-SearchBean">SearchBean</a></li><li><a shape="rect"
href="#JAX-RSSearch-Convertingthequeries">Converting the queries</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#JAX-RSSearch-SQL">SQL</a></li><li><a
shape="rect" href="#JAX-RSSearch-JPA2.0">JPA 2.0</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#JAX-RSSearch-Countexpressions">Count
expressions</a></li></ul>
@@ -251,7 +251,7 @@ public class Name {
  &lt;entry key="owner" value="ownerinfo.name.name"/&gt;
 &lt;/map&gt;
 </pre>
-</div></div><h3 id="JAX-RSSearch-Parserproperties">Parser properties</h3><p>The
parser properties are the ones which tell the parser how to treat the conversion of Date values
and the unrecognized search property names.</p><p>As explained above, "search.lax.property.match"
can be used to tell the parser that it should ignore the search property names which have
no corresponding bean properties.</p><p>"search.date.format" and "search.timezone.support"
tell the parser how to convert the date values, see "Using dates in queries" section.</p><p>More
properties may be supported in the future.</p><p>All of these properties can be
set as endpoint contextual properties or directly with SearchContext.</p><h2 id="JAX-RSSearch-Mappingofquerypropertiestocolumn/fieldnames">Mapping
of query properties to column/field names</h2><p>When converting FIQL queries
to SQL or other untyped query language expressions, as well as when using Lucene converter,
it can be useful to be able to map between an ac
 tual query parameter and the column or field name. All FIQL converters shipped with CXF have
constructors accepting a map for mapping the queries to columns/fields. See the next "SearchBean"
section for one example.</p><p>Note this property is not the same as the one described
in the "Mapping of query properties to bean properties" section. The latter (the one described
in the previous section) is required for getting FIQL queries captured into typed, domain
specific beans like Book, and it can be sufficient for JPA2 which also has annotations like
@Column.</p><h2 id="JAX-RSSearch-SearchBean">SearchBean</h2><p>org.apache.cxf.jaxrs.ext.search.SearchBean
is a utility bean class which can simplify analyzing the captured FIQL expressions and converting
them to the other language expressions, in cases where having to update the bean class such
as Book.class with all the properties that may need to be supported is not practical or the
properties need to be managed manually. For example:</
 p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
+</div></div><h3 id="JAX-RSSearch-Dealingwithmistypedpropertynames">Dealing
with mistyped property names</h3><p>Consider a case where a documented search
property is named as 'address' (lower case) and a query contains a mistyped 'Address' instead.
In this case, unless a&#160;"search.lax.property.match" property is set, PropertyNotFoundException
will be thrown.</p><p>Supporting case-insensitive property mapping is easy, register
a "search.bean.property.map" (mentioned earlier) map as Java TreeMap</p><p>with
a case-insensitive String.CASE_INSENSITIVE_ORDER Comparator.</p><p>However it
will not help if the 'address' property was mistyped as 'adress'. In this case, "search.bean.property.map"
might still be useful with having few more keys supporting some typical typos, example, 'adress'
- 'address',&#160;'addres' - 'address', etc.</p><p>Starting from&#160;
CXF 3.1.5,&#160;org.apache.cxf.jaxrs.ext.search.PropertyNameConverter&#160; is available
and might be used for a more sophisticated 
 conversion of mistyped property names to correct names.&#160;</p><p>The implementation
can be registered as a "search.bean.property.converter" endpoint contextual property.</p><h3
id="JAX-RSSearch-Parserproperties">Parser properties</h3><p>The parser properties
are the ones which tell the parser how to treat the conversion of Date values and the unrecognized
search property names.</p><p>As explained above, "search.lax.property.match" can
be used to tell the parser that it should ignore the search property names which have no corresponding
bean properties.</p><p>"search.date.format" and "search.timezone.support" tell
the parser how to convert the date values, see "Using dates in queries" section.</p><p>More
properties may be supported in the future.</p><p>All of these properties can be
set as endpoint contextual properties or directly with SearchContext.</p><h2 id="JAX-RSSearch-Mappingofquerypropertiestocolumn/fieldnames">Mapping
of query properties to column/field names</h2><p>When 
 converting FIQL queries to SQL or other untyped query language expressions, as well as when
using Lucene converter, it can be useful to be able to map between an actual query parameter
and the column or field name. All FIQL converters shipped with CXF have constructors accepting
a map for mapping the queries to columns/fields. See the next "SearchBean" section for one
example.</p><p>Note this property is not the same as the one described in the
"Mapping of query properties to bean properties" section. The latter (the one described in
the previous section) is required for getting FIQL queries captured into typed, domain specific
beans like Book, and it can be sufficient for JPA2 which also has annotations like @Column.</p><h2
id="JAX-RSSearch-SearchBean">SearchBean</h2><p>org.apache.cxf.jaxrs.ext.search.SearchBean
is a utility bean class which can simplify analyzing the captured FIQL expressions and converting
them to the other language expressions, in cases where having to update th
 e bean class such as Book.class with all the properties that may need to be supported is
not practical or the properties need to be managed manually. For example:</p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent
pdl">
 <pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">//
?_s="level=gt=10"
 SearchCondition&lt;SearchBean&gt; sc = searchContext.getCondition(SearchBean.class);
 



Mime
View raw message