1 package de.dhbwloe.campusapp.fragments;
3 import java.text.SimpleDateFormat;
7 * Created by pk910 on 20.02.2016.
9 public class VorlesungsplanGroupsListItem {
11 private String courseName;
12 private String groupName;
13 private long firstEvent, lastEvent, nextEvent, nextKlausurEvent;
14 private int eventCount;
16 public VorlesungsplanGroupsListItem(int groupid, String coursename, String groupname, long firstevent, long lastevent, int eventcount, long nextevent, long nextklausur) {
18 courseName = coursename;
19 groupName = groupname;
20 firstEvent = firstevent;
21 lastEvent = lastevent;
22 eventCount = eventcount;
23 nextEvent = nextevent;
24 nextKlausurEvent = nextklausur;
27 public int getGroupId() {
31 public String getCourseName() {
35 public String getGroupName() {
39 public String getFirstEvent() {
40 SimpleDateFormat dateFormat = new SimpleDateFormat("dd.MM.yyyy HH:mm");
41 Date date = new Date(firstEvent*1000);
42 return dateFormat.format(date);
45 public String getLastEvent() {
46 SimpleDateFormat dateFormat = new SimpleDateFormat("dd.MM.yyyy HH:mm");
47 Date date = new Date(lastEvent*1000);
48 return dateFormat.format(date);
51 public String getNextEvent() {
52 SimpleDateFormat dateFormat = new SimpleDateFormat("dd.MM.yyyy HH:mm");
53 Date date = new Date(nextEvent*1000);
54 return dateFormat.format(date);
57 public String getNextKlausurEvent() {
58 if(nextKlausurEvent == 0)
60 SimpleDateFormat dateFormat = new SimpleDateFormat("dd.MM.yyyy HH:mm");
61 Date date = new Date(nextKlausurEvent*1000);
62 return dateFormat.format(date);
65 public int getEventCount() {