Package com.plannaplan.entities
Class Groups
java.lang.Object
com.plannaplan.entities.Groups
@Entity
public class Groups
extends java.lang.Object
Entity of Groups grouping of state ssociated about
course,time,room,capacity,type,day
-
Constructor Summary
Constructors Constructor Description Groups()
Groups(int capacity, java.lang.String room, Course course, int time, int endTime, WeekDay day, Lecturer lecturer)
GroupsGroups(int capacity, java.lang.String room, Course course, int time, int endTime, WeekDay day, Lecturer lecturer, java.lang.Integer zajCykId, java.lang.Integer grNr)
GroupsGroups(int capacity, java.lang.String room, Course course, int time, int endTime, WeekDay day, Lecturer lecturer, java.lang.Integer zajCykId, java.lang.Integer grNr, GroupType type)
GroupsGroups(int capacity, java.lang.String room, Course course, int time, WeekDay day, Lecturer lecturer)
Create groups with default class durationGroups(int capacity, java.lang.String room, Course course, int time, WeekDay day, Lecturer lecturer, java.lang.Integer zajCykId, java.lang.Integer grNr)
GroupsGroups(int capacity, java.lang.String room, Course course, int time, WeekDay day, Lecturer lecturer, java.lang.Integer zajCykId, java.lang.Integer grNr, GroupType type)
Groups -
Method Summary
Modifier and Type Method Description void
assignUser(User user)
int
getCapacity()
getCapacityCourse
getCourseId()
getCourseIdWeekDay
getDay()
WeekDayint
getEndTime()
get time of class endjava.lang.String
getEndTimeString()
gets end time formated strinsjava.lang.Integer
getGrNr()
java.lang.Long
getId()
getIdLecturer
getLecturer()
getLecturerjava.util.Set<User>
getRegisteredStudents()
java.lang.String
getRoom()
getRoomint
getTime()
getTimejava.lang.String
getTimeString()
getTimeStringGroupType
getType()
GroupTypejava.lang.Integer
getZajCykId()
void
setCapacity(int capacity)
setCapacityvoid
setCourseId(Course courseId)
setCourseIdvoid
setDay(WeekDay day)
setLecturervoid
setGrNr(java.lang.Integer grNr)
void
setLecturer(Lecturer lecturer)
setLecturervoid
setRoom(java.lang.String room)
setRoomvoid
setTime(int time)
setTimevoid
setType(GroupType type)
setTypevoid
setZajCykId(java.lang.Integer zajCykId)
void
update(java.lang.Integer capacity, java.lang.String room, Course course, java.lang.Integer time, java.lang.Integer endTime, WeekDay day, Lecturer lecturer, GroupType type)
Updates given values other that are not null
-
Constructor Details
-
Groups
public Groups() -
Groups
public Groups(int capacity, java.lang.String room, Course course, int time, int endTime, WeekDay day, Lecturer lecturer)Groups- Parameters:
capacity
- capacity given to the groupsroom
- room given to the groupscourse
- course given to the groupstime
- time given to the groupsendTime
- end time of class in minutesday
- day given to the groupslecturer
- lecturer given to the groups
-
Groups
public Groups(int capacity, java.lang.String room, Course course, int time, int endTime, WeekDay day, Lecturer lecturer, java.lang.Integer zajCykId, java.lang.Integer grNr, GroupType type)Groups- Parameters:
capacity
- capacity given to the groupsroom
- room given to the groupscourse
- course given to the groupstime
- time given to the groupsendTime
- end time of class in minutesday
- day given to the groupslecturer
- lecturer given to the groupszajCykId
- number of class in the termgrNr
- Number of class/coursetype
- type of class/cource
-
Groups
public Groups(int capacity, java.lang.String room, Course course, int time, WeekDay day, Lecturer lecturer, java.lang.Integer zajCykId, java.lang.Integer grNr, GroupType type)Groups- Parameters:
capacity
- capacity given to the groupsroom
- room given to the groupscourse
- course given to the groupstime
- time given to the groupsday
- day given to the groupslecturer
- lecturer given to the groupszajCykId
- number of class in the termgrNr
- Number of class/coursetype
- type of class/cource
-
Groups
public Groups(int capacity, java.lang.String room, Course course, int time, int endTime, WeekDay day, Lecturer lecturer, java.lang.Integer zajCykId, java.lang.Integer grNr)Groups- Parameters:
capacity
- capacity given to the groupsroom
- room given to the groupscourse
- course given to the groupstime
- time given to the groupsendTime
- end time of class in minutesday
- day given to the groupslecturer
- lecturer given to the groupszajCykId
- number of class in the termgrNr
- Number of class/course
-
Groups
public Groups(int capacity, java.lang.String room, Course course, int time, WeekDay day, Lecturer lecturer, java.lang.Integer zajCykId, java.lang.Integer grNr)Groups- Parameters:
capacity
- capacity given to the groupsroom
- room given to the groupscourse
- course given to the groupstime
- time given to the groupsday
- day given to the groupslecturer
- lecturer given to the groupszajCykId
- number of class in the termgrNr
- Number of class/course
-
Groups
public Groups(int capacity, java.lang.String room, Course course, int time, WeekDay day, Lecturer lecturer)Create groups with default class duration- Parameters:
capacity
- capacity given to the groupsroom
- room given to the groupscourse
- course given to the groupstime
- time given to the groupsday
- day given to the groupslecturer
- lecturer given to the groups
-
-
Method Details
-
getRegisteredStudents
-
assignUser
-
getGrNr
public java.lang.Integer getGrNr() -
setGrNr
public void setGrNr(java.lang.Integer grNr) -
getZajCykId
public java.lang.Integer getZajCykId() -
setZajCykId
public void setZajCykId(java.lang.Integer zajCykId) -
update
public void update(java.lang.Integer capacity, java.lang.String room, Course course, java.lang.Integer time, java.lang.Integer endTime, WeekDay day, Lecturer lecturer, GroupType type)Updates given values other that are not null- Parameters:
capacity
- capacity given to the groupsroom
- room given to the groupscourse
- course given to the groupstime
- time given to the groupsendTime
- end time of class in minutesday
- day given to the groupslecturer
- lecturer given to the groupstype
- type given to the groups
-
getEndTime
public int getEndTime()get time of class end- Returns:
- hour of class finish time in minutes
-
getId
public java.lang.Long getId()getId- Returns:
- id
-
getLecturer
getLecturer- Returns:
- lecturer
-
setLecturer
setLecturer- Parameters:
lecturer
- set lecturer into groups
-
getDay
WeekDay- Returns:
- day
-
setDay
setLecturer- Parameters:
day
- set day into groups
-
getType
GroupType- Returns:
- type
-
setType
setType- Parameters:
type
- set type into groups
-
getCapacity
public int getCapacity()getCapacity- Returns:
- capacity
-
setCapacity
public void setCapacity(int capacity)setCapacity- Parameters:
capacity
- set capacity into groups
-
getRoom
public java.lang.String getRoom()getRoom- Returns:
- room
-
setRoom
public void setRoom(java.lang.String room)setRoom- Parameters:
room
- set room into groups
-
getTime
public int getTime()getTime- Returns:
- time
-
setTime
public void setTime(int time)setTime- Parameters:
time
- set time into groups
-
getCourseId
getCourseId- Returns:
- course
-
setCourseId
setCourseId- Parameters:
courseId
- set courseId into groups
-
getTimeString
public java.lang.String getTimeString()getTimeString- Returns:
- time as formated String
-
getEndTimeString
public java.lang.String getEndTimeString()gets end time formated strins- Returns:
- end time as formated String
-