1 package de.dhbwloe.campusapp.vorlesungen;
3 import de.dhbwloe.campusapp.database.DatabaseManager;
6 * Created by pk910 on 20.01.2016.
8 public class CourseEvent {
10 private String sCourseName;
11 private String sUniqueId;
12 private int iSequenceId;
13 private long iEventFrom, iEventTo;
14 private String sEventTitle, sEventLocation, sEventStatus;
15 private String sRecurRule, sExcludeDates;
16 private CourseGroup oCourseGroup;
18 private boolean bMustUpdate = false;
19 private boolean bIsNew = false;
21 public CourseEvent(int id, String coursename, String uniqueid, int sequenceid, long eventfrom, long eventto, String title, String location, String status, String rrule, String exdates, CourseGroup group) {
23 sCourseName = coursename;
25 iSequenceId = sequenceid;
26 iEventFrom = eventfrom;
29 sEventLocation = location;
30 sEventStatus = status;
32 sExcludeDates = exdates;
36 group.addCourseEvent(this);
39 public CourseEvent(String coursename, String uniqueid, int sequenceid, boolean isNew) {
40 sCourseName = coursename;
42 iSequenceId = sequenceid;
47 public void setEventId(int id) {
51 public int getEventId() {
55 private void resetUpdateFlag() {
60 public void update(DatabaseManager dbm) {
64 dbm.updateCourseCalendar(this);
68 public CourseGroup getCourseGroup() {
72 public void setCourseGroup(CourseGroup group) {
73 group.addCourseEvent(this);
77 public String getUniqueId() {
81 public boolean IsPendingUpdate() {
85 public boolean IsNewEvent() {
89 public String getEventStatus() {
93 public void setEventStatus(String sEventStatus) {
94 this.sEventStatus = sEventStatus;
98 public String getEventLocation() {
99 return sEventLocation;
102 public void setEventLocation(String sEventLocation) {
103 this.sEventLocation = sEventLocation;
107 public String getEventTitle() {
110 public String getGroupTitle() {
111 return sEventTitle; // maybe cut prof name?
114 public void setEventTitle(String sEventTitle) {
115 this.sEventTitle = sEventTitle;
119 public long getEventTo() {
123 public void setEventTo(long iEventTo) {
124 this.iEventTo = iEventTo;
128 public long getEventFrom() {
132 public void setEventFrom(long iEventFrom) {
133 this.iEventFrom = iEventFrom;
137 public String getCourseName() {
141 public int getSequenceId() {
145 public void setSequenceId(int iSequenceId) {
146 this.iSequenceId = iSequenceId;
150 public String getRecurRule() {
154 public void setRecurRule(String rrule) {
155 this.sRecurRule = rrule;
159 public String getExcludeDates() {
160 return sExcludeDates;
163 public void setExcludeDates(String exrules) {
164 this.sExcludeDates = exrules;