Class Assignment

java.lang.Object
com.nicholasalfonso.lato.entity.Assignment

@Entity public class Assignment extends Object
JPA entity representing an assignment. Stores assignment data with support for synced (from LMS) and custom user-defined attributes. Assignments can be marked as completed or archived, and have priority levels.
  • Constructor Details

    • Assignment

      public Assignment()
  • Method Details

    • getId

      public Long getId()
      Gets the ID of this assignment.
      Returns:
      the assignment ID
    • getCourse

      public Course getCourse()
      Gets the course this assignment belongs to.
      Returns:
      the associated course
    • setCourse

      public void setCourse(Course course)
      Sets the course for this assignment.
      Parameters:
      course - the course to associate
    • getExternalId

      public String getExternalId()
      Gets the external ID from the LMS.
      Returns:
      the external ID
    • setExternalId

      public void setExternalId(String externalId)
      Sets the external ID from the LMS.
      Parameters:
      externalId - the external ID
    • getSyncedTitle

      public String getSyncedTitle()
      Gets the synced title from the LMS.
      Returns:
      the synced title
    • setSyncedTitle

      public void setSyncedTitle(String syncedTitle)
      Sets the synced title from the LMS.
      Parameters:
      syncedTitle - the synced title
    • getCustomTitle

      public String getCustomTitle()
      Gets the custom title.
      Returns:
      the custom title
    • setCustomTitle

      public void setCustomTitle(String customTitle)
      Sets the custom title.
      Parameters:
      customTitle - the custom title
    • getSyncedDescription

      public String getSyncedDescription()
      Gets the synced description from the LMS.
      Returns:
      the synced description
    • setSyncedDescription

      public void setSyncedDescription(String syncedDescription)
      Sets the synced description from the LMS.
      Parameters:
      syncedDescription - the synced description
    • getCustomDescription

      public String getCustomDescription()
      Gets the custom description.
      Returns:
      the custom description
    • setCustomDescription

      public void setCustomDescription(String customDescription)
      Sets the custom description.
      Parameters:
      customDescription - the custom description
    • getSyncedDueDate

      public LocalDate getSyncedDueDate()
      Gets the synced due date from the LMS.
      Returns:
      the synced due date
    • setSyncedDueDate

      public void setSyncedDueDate(LocalDate syncedDueDate)
      Sets the synced due date from the LMS.
      Parameters:
      syncedDueDate - the synced due date
    • getCustomDueDate

      public LocalDate getCustomDueDate()
      Gets the custom due date.
      Returns:
      the custom due date
    • setCustomDueDate

      public void setCustomDueDate(LocalDate customDueDate)
      Sets the custom due date.
      Parameters:
      customDueDate - the custom due date
    • getSyncedDueTime

      public LocalTime getSyncedDueTime()
      Gets the synced due time from the LMS.
      Returns:
      the synced due time
    • setSyncedDueTime

      public void setSyncedDueTime(LocalTime syncedDueTime)
      Sets the synced due time from the LMS.
      Parameters:
      syncedDueTime - the synced due time
    • getCustomDueTime

      public LocalTime getCustomDueTime()
      Gets the custom due time.
      Returns:
      the custom due time
    • setCustomDueTime

      public void setCustomDueTime(LocalTime customDueTime)
      Sets the custom due time.
      Parameters:
      customDueTime - the custom due time
    • getPriority

      public Assignment.AssignmentPriority getPriority()
      Gets the priority level of this assignment.
      Returns:
      the priority
    • setPriority

      public void setPriority(Assignment.AssignmentPriority priority)
      Sets the priority level of this assignment.
      Parameters:
      priority - the priority
    • isCompleted

      public boolean isCompleted()
      Checks if this assignment is completed.
      Returns:
      true if completed, false otherwise
    • setCompleted

      public void setCompleted(boolean completed)
      Sets whether this assignment is completed.
      Parameters:
      completed - true to mark as completed
    • isArchived

      public boolean isArchived()
      Checks if this assignment is archived.
      Returns:
      true if archived, false otherwise
    • setArchived

      public void setArchived(boolean archived)
      Sets whether this assignment is archived.
      Parameters:
      archived - true to archive the assignment
    • getCreatedAt

      public Instant getCreatedAt()
      Gets the creation timestamp.
      Returns:
      the creation timestamp
    • getUpdatedAt

      public Instant getUpdatedAt()
      Gets the last update timestamp.
      Returns:
      the update timestamp
    • getDisplayTitle

      public String getDisplayTitle()
      Gets the display title, preferring custom title over synced title.
      Returns:
      the title to display
    • getDisplayDescription

      public String getDisplayDescription()
      Gets the display description, preferring custom description over synced description.
      Returns:
      the description to display
    • getDisplayDueDate

      public LocalDate getDisplayDueDate()
      Gets the display due date, preferring custom due date over synced due date.
      Returns:
      the due date to display
    • getDisplayDueTime

      public LocalTime getDisplayDueTime()
      Gets the display due time, preferring custom due time over synced due time.
      Returns:
      the due time to display
    • getNote

      public Note getNote()
      Gets the associated note for this assignment.
      Returns:
      the note
    • setNote

      public void setNote(Note note)
      Sets the associated note for this assignment.
      Parameters:
      note - the note to associate
    • getType

      public Assignment.AssignmentType getType()
      Gets the type of this assignment.
      Returns:
      the assignment type
    • setType

      public void setType(Assignment.AssignmentType type)
      Sets the type of this assignment.
      Parameters:
      type - the assignment type
    • setId

      public void setId(long l)
      Sets the ID of this assignment.
      Parameters:
      l - the ID