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 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 groups
      room - room given to the groups
      course - course given to the groups
      time - time given to the groups
      endTime - end time of class in minutes
      day - day given to the groups
      lecturer - 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 groups
      room - room given to the groups
      course - course given to the groups
      time - time given to the groups
      endTime - end time of class in minutes
      day - day given to the groups
      lecturer - lecturer given to the groups
      zajCykId - number of class in the term
      grNr - Number of class/course
      type - 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 groups
      room - room given to the groups
      course - course given to the groups
      time - time given to the groups
      day - day given to the groups
      lecturer - lecturer given to the groups
      zajCykId - number of class in the term
      grNr - Number of class/course
      type - 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 groups
      room - room given to the groups
      course - course given to the groups
      time - time given to the groups
      endTime - end time of class in minutes
      day - day given to the groups
      lecturer - lecturer given to the groups
      zajCykId - number of class in the term
      grNr - 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 groups
      room - room given to the groups
      course - course given to the groups
      time - time given to the groups
      day - day given to the groups
      lecturer - lecturer given to the groups
      zajCykId - number of class in the term
      grNr - 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 groups
      room - room given to the groups
      course - course given to the groups
      time - time given to the groups
      day - day given to the groups
      lecturer - lecturer given to the groups
  • Method Details

    • getRegisteredStudents

      public java.util.Set<User> getRegisteredStudents()
    • assignUser

      public void assignUser​(User user)
    • 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 groups
      room - room given to the groups
      course - course given to the groups
      time - time given to the groups
      endTime - end time of class in minutes
      day - day given to the groups
      lecturer - lecturer given to the groups
      type - 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

      public Lecturer getLecturer()
      getLecturer
      Returns:
      lecturer
    • setLecturer

      public void setLecturer​(Lecturer lecturer)
      setLecturer
      Parameters:
      lecturer - set lecturer into groups
    • getDay

      public WeekDay getDay()
      WeekDay
      Returns:
      day
    • setDay

      public void setDay​(WeekDay day)
      setLecturer
      Parameters:
      day - set day into groups
    • getType

      public GroupType getType()
      GroupType
      Returns:
      type
    • setType

      public void setType​(GroupType type)
      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

      public Course getCourseId()
      getCourseId
      Returns:
      course
    • setCourseId

      public void setCourseId​(Course courseId)
      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