--- /dev/null
+package de.dhbwloe.campusapp.fragments;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+/**
+ * Created by pk910 on 20.02.2016.
+ */
+public class VorlesungsplanGroupsListItem {
+ private int groupId;
+ private String courseName;
+ private String groupName;
+ private long firstEvent, lastEvent, nextEvent, nextKlausurEvent;
+ private int eventCount;
+
+ public VorlesungsplanGroupsListItem(int groupid, String coursename, String groupname, long firstevent, long lastevent, int eventcount, long nextevent, long nextklausur) {
+ groupId = groupid;
+ courseName = coursename;
+ groupName = groupname;
+ firstEvent = firstevent;
+ lastEvent = lastevent;
+ eventCount = eventcount;
+ nextEvent = nextevent;
+ nextKlausurEvent = nextklausur;
+ }
+
+ public int getGroupId() {
+ return groupId;
+ }
+
+ public String getCourseName() {
+ return courseName;
+ }
+
+ public String getGroupName() {
+ return groupName;
+ }
+
+ public String getFirstEvent() {
+ SimpleDateFormat dateFormat = new SimpleDateFormat("dd.MM.yyyy HH:mm");
+ Date date = new Date(firstEvent*1000);
+ return dateFormat.format(date);
+ }
+
+ public String getLastEvent() {
+ SimpleDateFormat dateFormat = new SimpleDateFormat("dd.MM.yyyy HH:mm");
+ Date date = new Date(lastEvent*1000);
+ return dateFormat.format(date);
+ }
+
+ public String getNextEvent() {
+ SimpleDateFormat dateFormat = new SimpleDateFormat("dd.MM.yyyy HH:mm");
+ Date date = new Date(nextEvent*1000);
+ return dateFormat.format(date);
+ }
+
+ public String getNextKlausurEvent() {
+ if(nextKlausurEvent == 0)
+ return null;
+ SimpleDateFormat dateFormat = new SimpleDateFormat("dd.MM.yyyy HH:mm");
+ Date date = new Date(nextKlausurEvent*1000);
+ return dateFormat.format(date);
+ }
+
+ public int getEventCount() {
+ return eventCount;
+ }
+}