roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r531064 - in /roller/branches/roller_3.1: CHANGES.txt src/org/apache/roller/business/hibernate/HibernateRefererManagerImpl.java src/org/apache/roller/business/hibernate/HibernateWeblogManagerImpl.java
Date Sat, 21 Apr 2007 16:52:59 GMT
Author: snoopdave
Date: Sat Apr 21 09:52:58 2007
New Revision: 531064

URL: http://svn.apache.org/viewvc?view=rev&rev=531064
Log:
Using Number instead of Integer for SQL sum() results

Modified:
    roller/branches/roller_3.1/CHANGES.txt
    roller/branches/roller_3.1/src/org/apache/roller/business/hibernate/HibernateRefererManagerImpl.java
    roller/branches/roller_3.1/src/org/apache/roller/business/hibernate/HibernateWeblogManagerImpl.java

Modified: roller/branches/roller_3.1/CHANGES.txt
URL: http://svn.apache.org/viewvc/roller/branches/roller_3.1/CHANGES.txt?view=diff&rev=531064&r1=531063&r2=531064
==============================================================================
--- roller/branches/roller_3.1/CHANGES.txt (original)
+++ roller/branches/roller_3.1/CHANGES.txt Sat Apr 21 09:52:58 2007
@@ -40,6 +40,7 @@
     * Fix for anchor creation when non-alpha characters are involved
     * Fix to invalidate session after new user registration 
     * Theme files no longer refer to legacy $entry variable
+    * Using Number instead of Integer for SQL sum() results
 
 
 -------------------------------------------------------------------------------

Modified: roller/branches/roller_3.1/src/org/apache/roller/business/hibernate/HibernateRefererManagerImpl.java
URL: http://svn.apache.org/viewvc/roller/branches/roller_3.1/src/org/apache/roller/business/hibernate/HibernateRefererManagerImpl.java?view=diff&rev=531064&r1=531063&r2=531064
==============================================================================
--- roller/branches/roller_3.1/src/org/apache/roller/business/hibernate/HibernateRefererManagerImpl.java
(original)
+++ roller/branches/roller_3.1/src/org/apache/roller/business/hibernate/HibernateRefererManagerImpl.java
Sat Apr 21 09:52:58 2007
@@ -291,7 +291,7 @@
             Iterator rawResults = query.list().iterator();
             for (Iterator it = query.list().iterator(); it.hasNext();) {
                 Object[] row = (Object[])it.next();
-                Integer hits = (Integer)row[0];
+                Number hits = (Number)row[0];
                 String websiteId = (String)row[1];
                 String websiteName = (String)row[2];
                 String websiteHandle = (String)row[3];
@@ -340,7 +340,7 @@
             Iterator rawResults = query.list().iterator();
             for (Iterator it = query.list().iterator(); it.hasNext();) {
                 Object[] row = (Object[])it.next();
-                Integer hits = (Integer)row[0];
+                Number hits = (Number)row[0];
                 String websiteId = (String)row[1];
                 String websiteName = (String)row[2];
                 String websiteHandle = (String)row[3];
@@ -348,7 +348,7 @@
                     websiteId,
                     websiteName,
                     websiteHandle,
-                    hits));              
+                    new Integer(hits.intValue())));              
             }
             return result;
             
@@ -390,11 +390,11 @@
         
         if (resultsArray.length > 0 && type.equals(DAYHITS)) {
             if ( resultsArray[0] != null ) {
-                hits = ((Integer) resultsArray[0]).intValue();
+                hits = ((Number) resultsArray[0]).intValue();
             }
         } else if ( resultsArray.length > 0 ) {
             if ( resultsArray[0] != null ) {
-                hits = ((Integer) resultsArray[1]).intValue();
+                hits = ((Number) resultsArray[1]).intValue();
             }
         } else {
             hits = 0;

Modified: roller/branches/roller_3.1/src/org/apache/roller/business/hibernate/HibernateWeblogManagerImpl.java
URL: http://svn.apache.org/viewvc/roller/branches/roller_3.1/src/org/apache/roller/business/hibernate/HibernateWeblogManagerImpl.java?view=diff&rev=531064&r1=531063&r2=531064
==============================================================================
--- roller/branches/roller_3.1/src/org/apache/roller/business/hibernate/HibernateWeblogManagerImpl.java
(original)
+++ roller/branches/roller_3.1/src/org/apache/roller/business/hibernate/HibernateWeblogManagerImpl.java
Sat Apr 21 09:52:58 2007
@@ -1337,7 +1337,7 @@
                 Object[] row = (Object[]) iter.next();
                 TagStat t = new TagStat();
                 t.setName((String) row[0]);
-                t.setCount(((Integer) row[1]).intValue());                
+                t.setCount(((Number) row[1]).intValue());                
                 
                 min = Math.min(min, t.getCount());
                 max = Math.max(max, t.getCount());                
@@ -1404,7 +1404,7 @@
                 Object[] row = (Object[]) iter.next();
                 TagStat ce = new TagStat();
                 ce.setName((String) row[0]);
-                ce.setCount(((Integer) row[1]).intValue());
+                ce.setCount(((Number) row[1]).intValue());
                 results.add(ce);
             }
 



Mime
View raw message