Permalink
Browse files

Updated reminders classes

  • Loading branch information...
1 parent 3bc5521 commit 06a48fe2c44602864c7daae0ea8f62eabc99e19a @dalezak committed Dec 6, 2010
View
@@ -4,6 +4,5 @@
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
- <classpathentry combineaccessrules="false" kind="src" path="/Frontline"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
@@ -38,9 +38,11 @@
* copyright owned by Kiwanja.net
*/
@Entity
-@DiscriminatorValue(value = "daily")
+@DiscriminatorValue(value=DailyReminder.OCCURRENCE)
public class DailyReminder extends Reminder {
+ public static final String OCCURRENCE = "daily";
+
private static final Logger LOG = FrontlineUtils.getLogger(DailyReminder.class);
public DailyReminder() {}
@@ -56,11 +58,11 @@ public String getOccurrenceLabel() {
@Override
public String getOccurrence() {
- return "daily";
+ return DailyReminder.OCCURRENCE;
}
public static boolean isSatisfiedBy(String occurrence) {
- return "daily".equalsIgnoreCase(occurrence);
+ return DailyReminder.OCCURRENCE.equalsIgnoreCase(occurrence);
}
public long getPeriod() {
@@ -38,9 +38,11 @@
* copyright owned by Kiwanja.net
*/
@Entity
-@DiscriminatorValue(value = "fridays")
+@DiscriminatorValue(value=FridaysReminder.OCCURRENCE)
public class FridaysReminder extends Reminder {
+ public static final String OCCURRENCE = "fridays";
+
private static final Logger LOG = FrontlineUtils.getLogger(FridaysReminder.class);
public FridaysReminder() {}
@@ -56,11 +58,11 @@ public String getOccurrenceLabel() {
@Override
public String getOccurrence() {
- return "fridays";
+ return FridaysReminder.OCCURRENCE;
}
public static boolean isSatisfiedBy(String occurrence) {
- return "fridays".equalsIgnoreCase(occurrence);
+ return FridaysReminder.OCCURRENCE.equalsIgnoreCase(occurrence);
}
public long getPeriod() {
@@ -38,9 +38,11 @@
* copyright owned by Kiwanja.net
*/
@Entity
-@DiscriminatorValue(value = "hourly")
+@DiscriminatorValue(value=HourlyReminder.OCCURRENCE)
public class HourlyReminder extends Reminder {
+ public static final String OCCURRENCE = "hourly";
+
private static final Logger LOG = FrontlineUtils.getLogger(HourlyReminder.class);
public HourlyReminder() {}
@@ -56,11 +58,11 @@ public String getOccurrenceLabel() {
@Override
public String getOccurrence() {
- return "hourly";
+ return HourlyReminder.OCCURRENCE;
}
public static boolean isSatisfiedBy(String occurrence) {
- return "hourly".equalsIgnoreCase(occurrence);
+ return HourlyReminder.OCCURRENCE.equalsIgnoreCase(occurrence);
}
public long getPeriod() {
@@ -38,9 +38,11 @@
* copyright owned by Kiwanja.net
*/
@Entity
-@DiscriminatorValue(value = "mondays")
+@DiscriminatorValue(value=MondaysReminder.OCCURRENCE)
public class MondaysReminder extends Reminder {
+ public static final String OCCURRENCE = "mondays";
+
private static final Logger LOG = FrontlineUtils.getLogger(MondaysReminder.class);
public MondaysReminder() {}
@@ -56,11 +58,11 @@ public String getOccurrenceLabel() {
@Override
public String getOccurrence() {
- return "mondays";
+ return MondaysReminder.OCCURRENCE;
}
public static boolean isSatisfiedBy(String occurrence) {
- return "mondays".equalsIgnoreCase(occurrence);
+ return MondaysReminder.OCCURRENCE.equalsIgnoreCase(occurrence);
}
public long getPeriod() {
@@ -31,9 +31,11 @@
import net.frontlinesms.ui.i18n.InternationalisationUtils;
@Entity
-@DiscriminatorValue(value = "monthly")
+@DiscriminatorValue(value=MonthlyReminder.OCCURRENCE)
public class MonthlyReminder extends Reminder {
+ public static final String OCCURRENCE = "monthly";
+
private static final Logger LOG = FrontlineUtils.getLogger(MonthlyReminder.class);
public MonthlyReminder() {}
@@ -49,11 +51,11 @@ public String getOccurrenceLabel() {
@Override
public String getOccurrence() {
- return "monthly";
+ return MonthlyReminder.OCCURRENCE;
}
public static boolean isSatisfiedBy(String occurrence) {
- return "monthly".equalsIgnoreCase(occurrence);
+ return MonthlyReminder.OCCURRENCE.equalsIgnoreCase(occurrence);
}
public long getPeriod() {
@@ -38,9 +38,11 @@
* copyright owned by Kiwanja.net
*/
@Entity
-@DiscriminatorValue(value = "once")
+@DiscriminatorValue(value=OnceReminder.OCCURRENCE)
public class OnceReminder extends Reminder {
+ public static final String OCCURRENCE = "once";
+
private static final Logger LOG = FrontlineUtils.getLogger(OnceReminder.class);
public OnceReminder() {}
@@ -56,11 +58,11 @@ public String getOccurrenceLabel() {
@Override
public String getOccurrence() {
- return "once";
+ return OnceReminder.OCCURRENCE;
}
public static boolean isSatisfiedBy(String occurrence) {
- return "once".equalsIgnoreCase(occurrence);
+ return OnceReminder.OCCURRENCE.equalsIgnoreCase(occurrence);
}
public long getPeriod() {
@@ -38,9 +38,11 @@
* copyright owned by Kiwanja.net
*/
@Entity
-@DiscriminatorValue(value = "saturdays")
+@DiscriminatorValue(value=SaturdaysReminder.OCCURRENCE)
public class SaturdaysReminder extends Reminder {
+ public static final String OCCURRENCE = "saturdays";
+
private static final Logger LOG = FrontlineUtils.getLogger(SaturdaysReminder.class);
public SaturdaysReminder() {}
@@ -56,11 +58,11 @@ public String getOccurrenceLabel() {
@Override
public String getOccurrence() {
- return "saturdays";
+ return SaturdaysReminder.OCCURRENCE;
}
public static boolean isSatisfiedBy(String occurrence) {
- return "saturdays".equalsIgnoreCase(occurrence);
+ return SaturdaysReminder.OCCURRENCE.equalsIgnoreCase(occurrence);
}
public long getPeriod() {
@@ -38,9 +38,11 @@
* copyright owned by Kiwanja.net
*/
@Entity
-@DiscriminatorValue(value = "sundays")
+@DiscriminatorValue(value=SundaysReminder.OCCURRENCE)
public class SundaysReminder extends Reminder {
+ public static final String OCCURRENCE = "sundays";
+
private static final Logger LOG = FrontlineUtils.getLogger(SundaysReminder.class);
public SundaysReminder() {}
@@ -56,11 +58,11 @@ public String getOccurrenceLabel() {
@Override
public String getOccurrence() {
- return "sundays";
+ return SundaysReminder.OCCURRENCE;
}
public static boolean isSatisfiedBy(String occurrence) {
- return "sundays".equalsIgnoreCase(occurrence);
+ return SundaysReminder.OCCURRENCE.equalsIgnoreCase(occurrence);
}
public long getPeriod() {
@@ -38,9 +38,11 @@
* copyright owned by Kiwanja.net
*/
@Entity
-@DiscriminatorValue(value = "thursdays")
+@DiscriminatorValue(value=ThursdaysReminder.OCCURRENCE)
public class ThursdaysReminder extends Reminder {
+ public static final String OCCURRENCE = "thursdays";
+
private static final Logger LOG = FrontlineUtils.getLogger(ThursdaysReminder.class);
public ThursdaysReminder() {}
@@ -56,11 +58,11 @@ public String getOccurrenceLabel() {
@Override
public String getOccurrence() {
- return "thursdays";
+ return ThursdaysReminder.OCCURRENCE;
}
public static boolean isSatisfiedBy(String occurrence) {
- return "thursdays".equalsIgnoreCase(occurrence);
+ return ThursdaysReminder.OCCURRENCE.equalsIgnoreCase(occurrence);
}
public long getPeriod() {
@@ -38,9 +38,11 @@
* copyright owned by Kiwanja.net
*/
@Entity
-@DiscriminatorValue(value = "tuesdays")
+@DiscriminatorValue(value=TuesdaysReminder.OCCURRENCE)
public class TuesdaysReminder extends Reminder {
+ public static final String OCCURRENCE = "tuesdays";
+
private static final Logger LOG = FrontlineUtils.getLogger(TuesdaysReminder.class);
public TuesdaysReminder() {}
@@ -56,11 +58,11 @@ public String getOccurrenceLabel() {
@Override
public String getOccurrence() {
- return "tuesdays";
+ return TuesdaysReminder.OCCURRENCE;
}
public static boolean isSatisfiedBy(String occurrence) {
- return "tuesdays".equalsIgnoreCase(occurrence);
+ return TuesdaysReminder.OCCURRENCE.equalsIgnoreCase(occurrence);
}
public long getPeriod() {
@@ -38,9 +38,11 @@
* copyright owned by Kiwanja.net
*/
@Entity
-@DiscriminatorValue(value = "wednesdays")
+@DiscriminatorValue(value=WednesdaysReminder.OCCURRENCE)
public class WednesdaysReminder extends Reminder {
+ public static final String OCCURRENCE = "wednesdays";
+
private static final Logger LOG = FrontlineUtils.getLogger(WednesdaysReminder.class);
public WednesdaysReminder() {}
@@ -56,11 +58,11 @@ public String getOccurrenceLabel() {
@Override
public String getOccurrence() {
- return "wednesdays";
+ return WednesdaysReminder.OCCURRENCE;
}
public static boolean isSatisfiedBy(String occurrence) {
- return "wednesdays".equalsIgnoreCase(occurrence);
+ return WednesdaysReminder.OCCURRENCE.equalsIgnoreCase(occurrence);
}
public long getPeriod() {
@@ -39,9 +39,11 @@
* copyright owned by Kiwanja.net
*/
@Entity
-@DiscriminatorValue(value = "weekdays")
+@DiscriminatorValue(value=WeekdaysReminder.OCCURRENCE)
public class WeekdaysReminder extends Reminder {
+ public static final String OCCURRENCE = "weekdays";
+
private static final Logger LOG = FrontlineUtils.getLogger(WeekdaysReminder.class);
public WeekdaysReminder() {}
@@ -57,11 +59,11 @@ public String getOccurrenceLabel() {
@Override
public String getOccurrence() {
- return "weekdays";
+ return WeekdaysReminder.OCCURRENCE;
}
public static boolean isSatisfiedBy(String occurrence) {
- return "weekdays".equalsIgnoreCase(occurrence);
+ return WeekdaysReminder.OCCURRENCE.equalsIgnoreCase(occurrence);
}
public long getPeriod() {
@@ -39,9 +39,11 @@
* copyright owned by Kiwanja.net
*/
@Entity
-@DiscriminatorValue(value = "weekends")
+@DiscriminatorValue(value=WeekendsReminder.OCCURRENCE)
public class WeekendsReminder extends Reminder {
+ public static final String OCCURRENCE = "weekends";
+
private static final Logger LOG = FrontlineUtils.getLogger(WeekendsReminder.class);
public WeekendsReminder() {}
@@ -57,11 +59,11 @@ public String getOccurrenceLabel() {
@Override
public String getOccurrence() {
- return "weekends";
+ return WeekendsReminder.OCCURRENCE;
}
public static boolean isSatisfiedBy(String occurrence) {
- return "weekends".equalsIgnoreCase(occurrence);
+ return WeekendsReminder.OCCURRENCE.equalsIgnoreCase(occurrence);
}
public long getPeriod() {
@@ -38,9 +38,11 @@
* copyright owned by Kiwanja.net
*/
@Entity
-@DiscriminatorValue(value = "weekly")
+@DiscriminatorValue(value=WeeklyReminder.OCCURRENCE)
public class WeeklyReminder extends Reminder {
+ public static final String OCCURRENCE = "weekly";
+
private static final Logger LOG = FrontlineUtils.getLogger(WeeklyReminder.class);
public WeeklyReminder() {}
@@ -56,11 +58,11 @@ public String getOccurrenceLabel() {
@Override
public String getOccurrence() {
- return "weekly";
+ return WeeklyReminder.OCCURRENCE;
}
public static boolean isSatisfiedBy(String occurrence) {
- return "weekly".equalsIgnoreCase(occurrence);
+ return WeeklyReminder.OCCURRENCE.equalsIgnoreCase(occurrence);
}
public long getPeriod() {

0 comments on commit 06a48fe

Please sign in to comment.