roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r519302 - in /incubator/roller/branches/roller_4.0_newbackend/src/org/apache/roller/business: datamapper/DatamapperWeblogManagerImpl.java datamapper/jpa/JPAWeblogManagerImpl.java jpa/JPAWeblogManagerImpl.java
Date Sat, 17 Mar 2007 12:21:31 GMT
Author: snoopdave
Date: Sat Mar 17 05:21:31 2007
New Revision: 519302

URL: http://svn.apache.org/viewvc?view=rev&rev=519302
Log:
Implementing changed WeblogManager interface in JPA

Modified:
    incubator/roller/branches/roller_4.0_newbackend/src/org/apache/roller/business/datamapper/DatamapperWeblogManagerImpl.java
    incubator/roller/branches/roller_4.0_newbackend/src/org/apache/roller/business/datamapper/jpa/JPAWeblogManagerImpl.java
    incubator/roller/branches/roller_4.0_newbackend/src/org/apache/roller/business/jpa/JPAWeblogManagerImpl.java

Modified: incubator/roller/branches/roller_4.0_newbackend/src/org/apache/roller/business/datamapper/DatamapperWeblogManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_4.0_newbackend/src/org/apache/roller/business/datamapper/DatamapperWeblogManagerImpl.java?view=diff&rev=519302&r1=519301&r2=519302
==============================================================================
--- incubator/roller/branches/roller_4.0_newbackend/src/org/apache/roller/business/datamapper/DatamapperWeblogManagerImpl.java
(original)
+++ incubator/roller/branches/roller_4.0_newbackend/src/org/apache/roller/business/datamapper/DatamapperWeblogManagerImpl.java
Sat Mar 17 05:21:31 2007
@@ -856,6 +856,7 @@
             status,
             null,
             null,
+            null,
             locale,          
             offset,
             length);

Modified: incubator/roller/branches/roller_4.0_newbackend/src/org/apache/roller/business/datamapper/jpa/JPAWeblogManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_4.0_newbackend/src/org/apache/roller/business/datamapper/jpa/JPAWeblogManagerImpl.java?view=diff&rev=519302&r1=519301&r2=519302
==============================================================================
--- incubator/roller/branches/roller_4.0_newbackend/src/org/apache/roller/business/datamapper/jpa/JPAWeblogManagerImpl.java
(original)
+++ incubator/roller/branches/roller_4.0_newbackend/src/org/apache/roller/business/datamapper/jpa/JPAWeblogManagerImpl.java
Sat Mar 17 05:21:31 2007
@@ -59,6 +59,7 @@
             String      catName,
             List        tags,
             String      status,
+            String      text,
             String      sortby,
             String      sortOrder,
             String      locale,
@@ -131,6 +132,14 @@
             queryString.append(" AND e.status = ?").append(size);
         }
 
+        if (text != null) {
+            params.add(size++, '%' + text + '%');
+            queryString.append(" AND ( text LIKE ?").append(size);
+            queryString.append("    OR summary LIKE ? ").append(size);
+            queryString.append("    OR title LIKE ?").append(size);
+            queryString.append(") ");
+        }
+        
         if (locale != null) {
             params.add(size++, locale + '%');
             queryString.append(" AND e.locale like ?").append(size);

Modified: incubator/roller/branches/roller_4.0_newbackend/src/org/apache/roller/business/jpa/JPAWeblogManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_4.0_newbackend/src/org/apache/roller/business/jpa/JPAWeblogManagerImpl.java?view=diff&rev=519302&r1=519301&r2=519302
==============================================================================
--- incubator/roller/branches/roller_4.0_newbackend/src/org/apache/roller/business/jpa/JPAWeblogManagerImpl.java
(original)
+++ incubator/roller/branches/roller_4.0_newbackend/src/org/apache/roller/business/jpa/JPAWeblogManagerImpl.java
Sat Mar 17 05:21:31 2007
@@ -498,6 +498,7 @@
             String      catName,
             List        tags,
             String      status,
+            String      text,
             String      sortby,
             String      sortOrder,
             String      locale,
@@ -590,6 +591,14 @@
             queryString.append(" AND e.locale like ?").append(size);
         }
         
+        if (text != null) {
+            params.add(size++, '%' + text + '%');
+            queryString.append(" AND ( text LIKE ?").append(size);
+            queryString.append("    OR summary LIKE ? ").append(size);
+            queryString.append("    OR title LIKE ?").append(size);
+            queryString.append(") ");
+        }
+        
         if (sortby != null && sortby.equals("updateTime")) {
             queryString.append(" ORDER BY e.updateTime ");
         } else {
@@ -1059,16 +1068,17 @@
         
         TreeMap map = new TreeMap(reverseComparator);
         
-        List entries = getWeblogEntries(
+        List entries = getWeblogEntries( 
                 website,
-                null,
+                null, // user
                 startDate,
                 endDate,
                 catName,
                 tags,
                 status,
-                null,
-                null,
+                null, // text
+                null, // sortBy
+                null, // sortOrder
                 locale,
                 offset,
                 length);



Mime
View raw message