incubator-olio-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sha...@apache.org
Subject svn commit: r769831 - in /incubator/olio/workload/rails/trunk/src/org/apache/olio/workload/loader: EventImages.java Images.java PersonImages.java
Date Wed, 29 Apr 2009 17:07:48 GMT
Author: shanti
Date: Wed Apr 29 17:07:48 2009
New Revision: 769831

URL: http://svn.apache.org/viewvc?rev=769831&view=rev
Log:
Fix for OLIO-86. The issue was that the same id was being used to represent
the key and filename in the images table. Since all images 
reside in the images table and the person images follow the thumbnail
images, the key needs to be offset appropriately so that the images table
has the correct filenames and id's for persons.

Modified:
    incubator/olio/workload/rails/trunk/src/org/apache/olio/workload/loader/EventImages.java
    incubator/olio/workload/rails/trunk/src/org/apache/olio/workload/loader/Images.java
    incubator/olio/workload/rails/trunk/src/org/apache/olio/workload/loader/PersonImages.java

Modified: incubator/olio/workload/rails/trunk/src/org/apache/olio/workload/loader/EventImages.java
URL: http://svn.apache.org/viewvc/incubator/olio/workload/rails/trunk/src/org/apache/olio/workload/loader/EventImages.java?rev=769831&r1=769830&r2=769831&view=diff
==============================================================================
--- incubator/olio/workload/rails/trunk/src/org/apache/olio/workload/loader/EventImages.java
(original)
+++ incubator/olio/workload/rails/trunk/src/org/apache/olio/workload/loader/EventImages.java
Wed Apr 29 17:07:48 2009
@@ -22,6 +22,7 @@
     public void prepare() {
      imageId = getSequence();
      ++imageId;
+	 imageKey = imageId;
      prefix = "e";
     }
 }

Modified: incubator/olio/workload/rails/trunk/src/org/apache/olio/workload/loader/Images.java
URL: http://svn.apache.org/viewvc/incubator/olio/workload/rails/trunk/src/org/apache/olio/workload/loader/Images.java?rev=769831&r1=769830&r2=769831&view=diff
==============================================================================
--- incubator/olio/workload/rails/trunk/src/org/apache/olio/workload/loader/Images.java (original)
+++ incubator/olio/workload/rails/trunk/src/org/apache/olio/workload/loader/Images.java Wed
Apr 29 17:07:48 2009
@@ -42,7 +42,7 @@
 
     static Logger logger = Logger.getLogger(Comments.class.getName());
 
-    int imageId;
+    int imageKey, imageId;
     String prefix;
 
     public String getClearStatement() {
@@ -62,7 +62,7 @@
             s.setInt(4, 1280);
             s.setInt(5, 960);
             s.setString(6, prefix + imageId + "t.jpg");
-            s.setInt(7, this.imageId);
+            s.setInt(7, this.imageKey);
             c.addBatch();
         } catch (SQLException e) {
             logger.log(Level.SEVERE, e.getMessage(), e);

Modified: incubator/olio/workload/rails/trunk/src/org/apache/olio/workload/loader/PersonImages.java
URL: http://svn.apache.org/viewvc/incubator/olio/workload/rails/trunk/src/org/apache/olio/workload/loader/PersonImages.java?rev=769831&r1=769830&r2=769831&view=diff
==============================================================================
--- incubator/olio/workload/rails/trunk/src/org/apache/olio/workload/loader/PersonImages.java
(original)
+++ incubator/olio/workload/rails/trunk/src/org/apache/olio/workload/loader/PersonImages.java
Wed Apr 29 17:07:48 2009
@@ -25,7 +25,8 @@
     public void prepare() {
      int i = getSequence();
      ++i;
-     imageId = ScaleFactors.events + i;
+	 imageId = i;
+     imageKey = ScaleFactors.events + i;
      prefix = "p";
     }
 }



Mime
View raw message