java.lang.Object
at.jku.dke.etutor.task_app.data.entities.BaseTask
All Implemented Interfaces:
Task
Direct Known Subclasses:
BaseTaskInGroup

@MappedSuperclass public abstract class BaseTask extends Object implements Task
Represents a task.

Add following annotations to extending classes:

 @Entity
 @Table(name = "task")
 
  • Constructor Details

    • BaseTask

      protected BaseTask()
      Creates a new instance of class BaseTask.
    • BaseTask

      protected BaseTask(BigDecimal maxPoints, TaskStatus status)
      Creates a new instance of class BaseTask.
      Parameters:
      maxPoints - The maximum achievable points.
      status - The status.
    • BaseTask

      protected BaseTask(Long id, BigDecimal maxPoints, TaskStatus status)
      Creates a new instance of class BaseTask.
      Parameters:
      id - The id.
      maxPoints - The maximum achievable points.
      status - The status.
  • Method Details

    • getId

      public Long getId()
      Gets the id.
      Specified by:
      getId in interface Task
      Returns:
      The id.
    • setId

      public void setId(Long id)
      Sets the id.
      Specified by:
      setId in interface Task
      Parameters:
      id - The id.
    • getMaxPoints

      public BigDecimal getMaxPoints()
      Gets the max points.
      Specified by:
      getMaxPoints in interface Task
      Returns:
      The max points.
    • setMaxPoints

      public void setMaxPoints(BigDecimal maxPoints)
      Sets the max points.
      Specified by:
      setMaxPoints in interface Task
      Parameters:
      maxPoints - The max points.
    • getStatus

      public TaskStatus getStatus()
      Gets the status.
      Specified by:
      getStatus in interface Task
      Returns:
      The status.
    • setStatus

      public void setStatus(TaskStatus status)
      Sets the status.
      Specified by:
      setStatus in interface Task
      Parameters:
      status - The status.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object