Class AssignmentService

java.lang.Object
com.plannaplan.services.AssignmentService

@Service
public class AssignmentService
extends java.lang.Object
Service of Assignment which can save assignments, diplay assignments, get ammount of assigments.
  • Constructor Summary

    Constructors 
    Constructor Description
    AssignmentService()  
  • Method Summary

    Modifier and Type Method Description
    void callAcceptAlgorythm()
    this method will activate accept algorythm for all students.
    long getAssignmentsAmmount()
    get ammount of all assignments (not only for selected commision)
    java.util.Optional<Assignment> getById​(java.lang.Long id)
    Get assigmnent by id
    java.util.List<Assignment> getCommisionAssignments​(Commision com)
    gets list of assignments of given commision
    Assignment save​(Assignment assignment)
    Save given assignment

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • save

      public Assignment save​(Assignment assignment)
      Save given assignment
      Parameters:
      assignment - assignment to save
      Returns:
      assignment saved assignment with database id
    • getCommisionAssignments

      public java.util.List<Assignment> getCommisionAssignments​(Commision com)
      gets list of assignments of given commision
      Parameters:
      com - Commision to get assinments from
      Returns:
      list of assignments
    • getAssignmentsAmmount

      public long getAssignmentsAmmount()
      get ammount of all assignments (not only for selected commision)
      Returns:
      long - ammount of assingments
    • getById

      public java.util.Optional<Assignment> getById​(java.lang.Long id)
      Get assigmnent by id
      Parameters:
      id - id of assigmnent
      Returns:
      Optional of assignment
    • callAcceptAlgorythm

      public void callAcceptAlgorythm()
      this method will activate accept algorythm for all students. Algorythm is takeing each student in order defined by ranking and accept for him groups that are joinable for him