cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1516159 - in /cxf/branches/2.6.x-fixes: ./ rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/ rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/sql/ systests/jaxrs/src/test/java/org/apache/cxf/systes...
Date Wed, 21 Aug 2013 13:30:55 GMT
Author: sergeyb
Date: Wed Aug 21 13:30:54 2013
New Revision: 1516159

URL: http://svn.apache.org/r1516159
Log:
Merged revisions 1516158 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.7.x-fixes

................
  r1516158 | sergeyb | 2013-08-21 16:26:18 +0300 (Wed, 21 Aug 2013) | 13 lines
  
  Merged revisions 1516152-1516153 via svnmerge from 
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r1516152 | sergeyb | 2013-08-21 16:17:30 +0300 (Wed, 21 Aug 2013) | 1 line
    
    [CXF-5212] Adding missing test file, sorry
  ........
    r1516153 | sergeyb | 2013-08-21 16:18:57 +0300 (Wed, 21 Aug 2013) | 1 line
    
    [CXF-5198] Getting expressions with camel case supported when SearchBean is used
  ........
................

Added:
    cxf/branches/2.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/AbstractSecureBookStore.java
      - copied unchanged from r1516158, cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/AbstractSecureBookStore.java
Modified:
    cxf/branches/2.6.x-fixes/   (props changed)
    cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SimpleSearchCondition.java
    cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/sql/SQLPrinterVisitorTest.java

Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/branches/2.7.x-fixes:r1516158
  Merged /cxf/trunk:r1516152-1516153

Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SimpleSearchCondition.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SimpleSearchCondition.java?rev=1516159&r1=1516158&r2=1516159&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SimpleSearchCondition.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SimpleSearchCondition.java
Wed Aug 21 13:30:54 2013
@@ -154,7 +154,8 @@ public class SimpleSearchCondition<T> im
                 : ((SearchBean)condition).getKeySet();
             
             for (String getter : keySet) {
-                ConditionType ct = getters2operators == null ? sharedType : getters2operators.get(getter);
+                ConditionType ct = getters2operators == null ? sharedType 
+                    : getters2operators.get(getter.toLowerCase());
                 if (ct == null) {
                     continue;
                 }

Modified: cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/sql/SQLPrinterVisitorTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/sql/SQLPrinterVisitorTest.java?rev=1516159&r1=1516158&r2=1516159&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/sql/SQLPrinterVisitorTest.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/sql/SQLPrinterVisitorTest.java
Wed Aug 21 13:30:54 2013
@@ -59,6 +59,18 @@ public class SQLPrinterVisitorTest exten
     }
     
     @Test
+    public void testSQLCamelNameSearchBean() throws SearchParseException {
+        FiqlParser<SearchBean> beanParser = new FiqlParser<SearchBean>(SearchBean.class);
+        SearchCondition<SearchBean> filter = beanParser.parse("theName==ami*;theLevel=gt=10");
+        SQLPrinterVisitor<SearchBean> visitor = new SQLPrinterVisitor<SearchBean>("table");
+        filter.accept(visitor);
+        String sql = visitor.getQuery();
+        
+        assertTrue("SELECT * FROM table WHERE (theName LIKE 'ami%') AND (theLevel > '10')".equals(sql)
+                   || "SELECT * FROM table WHERE (theLevel > '10') AND (theName LIKE 'ami%')".equals(sql));
+    }
+    
+    @Test
     public void testSQL2() throws SearchParseException {
         SearchCondition<Condition> filter = parser.parse("name==ami*,level=gt=10");
         SQLPrinterVisitor<Condition> visitor = new SQLPrinterVisitor<Condition>("table");



Mime
View raw message