cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1404148 - in /cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search: SearchUtils.java jpa/AbstractJPATypedQueryVisitor.java jpa/JPATypedQueryVisitor.java
Date Wed, 31 Oct 2012 14:10:45 GMT
Author: sergeyb
Date: Wed Oct 31 14:10:44 2012
New Revision: 1404148

URL: http://svn.apache.org/viewvc?rev=1404148&view=rev
Log:
Minor updates to the search code

Modified:
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchUtils.java
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/AbstractJPATypedQueryVisitor.java
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitor.java

Modified: cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchUtils.java?rev=1404148&r1=1404147&r2=1404148&view=diff
==============================================================================
--- cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchUtils.java
(original)
+++ cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchUtils.java
Wed Oct 31 14:10:44 2012
@@ -26,11 +26,10 @@ import org.apache.cxf.jaxrs.ext.search.s
 
 public final class SearchUtils {
     public static final String DEFAULT_DATE_FORMAT = "yyyy-MM-dd";
-    //public static final String DEFAULT_DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSZ";
     public static final String DATE_FORMAT_PROPERTY = "search.date-format";
     public static final String TIMEZONE_SUPPORT_PROPERTY = "search.timezone.support";
     public static final String LAX_PROPERTY_MATCH = "search.lax.property.match";
-    public static final String BEAN_PROPERTY_MAP = "search.lax.property.match";
+    public static final String BEAN_PROPERTY_MAP = "search.bean.property.map";
     
     private SearchUtils() {
         

Modified: cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/AbstractJPATypedQueryVisitor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/AbstractJPATypedQueryVisitor.java?rev=1404148&r1=1404147&r2=1404148&view=diff
==============================================================================
--- cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/AbstractJPATypedQueryVisitor.java
(original)
+++ cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/AbstractJPATypedQueryVisitor.java
Wed Oct 31 14:10:44 2012
@@ -24,6 +24,7 @@ import java.util.Map;
 import java.util.Stack;
 
 import javax.persistence.EntityManager;
+import javax.persistence.TypedQuery;
 import javax.persistence.criteria.CriteriaBuilder;
 import javax.persistence.criteria.CriteriaQuery;
 import javax.persistence.criteria.Path;
@@ -124,6 +125,10 @@ public abstract class AbstractJPATypedQu
         return root;
     }
     
+    public TypedQuery<T1> getTypedQuery() {
+        return em.createQuery(getCriteriaQuery());
+    }
+    
     public CriteriaQuery<T1> getCriteriaQuery() {
         if (!criteriaFinalized) {
             List<Predicate> predsList = predStack.pop();

Modified: cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitor.java?rev=1404148&r1=1404147&r2=1404148&view=diff
==============================================================================
--- cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitor.java
(original)
+++ cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitor.java
Wed Oct 31 14:10:44 2012
@@ -22,7 +22,6 @@ import java.util.Map;
 
 import javax.persistence.EntityManager;
 import javax.persistence.TypedQuery;
-import javax.persistence.criteria.CriteriaQuery;
 
 public class JPATypedQueryVisitor<T> extends AbstractJPATypedQueryVisitor<T, T,
TypedQuery<T>> {
 
@@ -35,7 +34,7 @@ public class JPATypedQueryVisitor<T> ext
     }
     
     public TypedQuery<T> getQuery() {
-        return getEntityManager().createQuery((CriteriaQuery<T>)getCriteriaQuery());
+        return getTypedQuery();
     }
         
 }



Mime
View raw message