]> iEval git - unical.git/commitdiff
Fix the three get functions
authorMarius Gavrilescu <marius@ieval.ro>
Sun, 9 Jun 2013 07:45:53 +0000 (10:45 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Sun, 9 Jun 2013 07:45:53 +0000 (10:45 +0300)
src/ro/ieval/unical/Attendee.java
src/ro/ieval/unical/Calendar.java
src/ro/ieval/unical/Event.java

index e39c5b0d21b2a1481b3f126b57ff4b3965aebd21..528121fec1ab7b42c7a6aa882a5dddda6699b541 100644 (file)
@@ -70,8 +70,10 @@ final class Attendee {
                final Cursor cursor = Attendees.query(cr, eventID, PROJECTION);
                cursor.moveToFirst();
                final Attendee[] attendees = new Attendee[cursor.getCount()];
-               for(int i=0;i<attendees.length;i++)
+               for(int i=0;i<attendees.length;i++){
                        attendees[i]=new Attendee(cursor.getLong(0), cursor.getLong(1), cursor.getString(2), cursor.getString(3), cursor.getInt(4), cursor.getInt(5), cursor.getInt(6));
+                       cursor.moveToNext();
+               }
                return attendees;
        }
 }
index 1507eb1b67915f90160e1a2a5dae7e88bbdf75b0..686aa06f7def16df678c905e74d921ce8cc4d391 100644 (file)
@@ -42,8 +42,10 @@ final class Calendar {
                final Cursor cursor = cr.query(Calendars.CONTENT_URI, PROJECTION, null, null, null);
                cursor.moveToFirst();
                final Calendar[] calendars = new Calendar[cursor.getCount()];
-               for(int i=0;i<calendars.length;i++)
+               for(int i=0;i<calendars.length;i++){
                        calendars[i]=new Calendar(cursor.getLong(0), cursor.getString(1), cursor.getString(2), cursor.getInt(3)!=0, cursor.getString(4), cursor.getString(5));
+                       cursor.moveToNext();
+               }
                return calendars;
        }
 }
index d1e8b22d803a6925aa4d0821ed6c3d86a3c52e40..af41133cda1098a1a0c4f1a97214c0f2160401f3 100644 (file)
@@ -73,8 +73,10 @@ final class Event implements Parcelable{
                                sort);
                cursor.moveToFirst();
                final Event[] events = new Event[cursor.getCount()];
-               for(int i=0;i<events.length;i++)
+               for(int i=0;i<events.length;i++){
                        events[i]=new Event(cursor.getLong(0), cursor.getString(1), cursor.getString(2), cursor.getString(3), cursor.getString(4), cursor.getInt(5), cursor.getLong(6), cursor.getLong(7), cursor.getLong(8));
+                       cursor.moveToNext();
+               }
                return events;
        }
 
This page took 0.030523 seconds and 4 git commands to generate.