Permalink
Browse files

introducedToday method for status

  • Loading branch information...
arturh committed Mar 16, 2012
1 parent aa916d1 commit 6f9c9be5953cacda048c8b7843efb308e33c8b42
Showing with 13 additions and 0 deletions.
  1. +13 −0 Memfoo/src-gen/org/bcn0/memfoo/Card.java
@@ -1,6 +1,7 @@
package org.bcn0.memfoo;
import java.util.Arrays;
+import java.util.Calendar;
import java.util.Date;
@@ -208,6 +209,18 @@ public void setLesson(Integer lesson) {
.list();
}
+
+ public static int introducedToday(CardDao cardDao) {
+ Calendar calendar = Calendar.getInstance();
+ calendar.setTime(new Date());
+ calendar.add(Calendar.HOUR, -24);
+ Date yesterday = calendar.getTime();
+ return cardDao.queryBuilder()
+ .where(Properties.Introduced.gt(yesterday))
+ .list()
+ .size();
+
+ }
// KEEP METHODS END
}

0 comments on commit 6f9c9be

Please sign in to comment.