org.sakaiproject.tool.gradebook
Class AssignmentGradeRecord

java.lang.Object
  extended by org.sakaiproject.tool.gradebook.AbstractGradeRecord
      extended by org.sakaiproject.tool.gradebook.AssignmentGradeRecord
All Implemented Interfaces:
Serializable

public class AssignmentGradeRecord
extends AbstractGradeRecord

An AssignmentGradeRecord is a grade record that can be associated with an Assignment.

Author:
Josh Holtzman
See Also:
Serialized Form

Field Summary
static Comparator<AssignmentGradeRecord> calcComparator
           
 
Fields inherited from class org.sakaiproject.tool.gradebook.AbstractGradeRecord
dateRecorded, gradableObject, graderId, id, studentId, version
 
Constructor Summary
AssignmentGradeRecord()
           
AssignmentGradeRecord(Assignment assignment, String studentId, Double grade)
          The graderId and dateRecorded properties will be set explicitly by the grade manager before the database is updated.
 
Method Summary
 AssignmentGradeRecord clone()
           
 Assignment getAssignment()
           
 BigDecimal getEarnedWeightedPercentage()
           
 Double getGradeAsPercentage()
          Returns null if the points earned is null.
 String getLetterEarned()
           
 BigDecimal getOverallWeight()
           
 Double getPercentEarned()
           
 Double getPointsEarned()
           
 String getUserEnteredGrade()
           
 boolean isCourseGradeRecord()
           
 Boolean isDropped()
           
 Boolean isExcludedFromGrade()
           
 boolean isUserAbleToView()
           
 void setDropped(Boolean isDropped)
           
 void setEarnedWeightedPercentage(BigDecimal earnedWeightedPercentage)
           
 void setExcludedFromGrade(Boolean isExcludedFromGrade)
           
 void setLetterEarned(String letterEarned)
           
 void setOverallWeight(BigDecimal overallWeight)
           
 void setPercentEarned(Double percentEarned)
           
 void setPointsEarned(Double pointsEarned)
           
 void setUserAbleToView(boolean userAbleToView)
           
 void setUserEnteredGrade(String userEnteredGrade)
           
 
Methods inherited from class org.sakaiproject.tool.gradebook.AbstractGradeRecord
getDateRecorded, getGradableObject, getGraderId, getId, getStudentId, getVersion, setDateRecorded, setGradableObject, setGraderId, setId, setStudentId, setVersion, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

calcComparator

public static Comparator<AssignmentGradeRecord> calcComparator
Constructor Detail

AssignmentGradeRecord

public AssignmentGradeRecord()

AssignmentGradeRecord

public AssignmentGradeRecord(Assignment assignment,
                             String studentId,
                             Double grade)
The graderId and dateRecorded properties will be set explicitly by the grade manager before the database is updated.

Parameters:
assignment - The assignment this grade record is associated with
studentId - The student id for whom this grade record belongs
grade - The grade, or points earned
Method Detail

getPointsEarned

public Double getPointsEarned()
Specified by:
getPointsEarned in class AbstractGradeRecord
Returns:
Returns the pointsEarned

setPointsEarned

public void setPointsEarned(Double pointsEarned)
Parameters:
pointsEarned - The pointsEarned to set.

getGradeAsPercentage

public Double getGradeAsPercentage()
Returns null if the points earned is null. Otherwise, returns earned / points possible * 100.

Specified by:
getGradeAsPercentage in class AbstractGradeRecord
See Also:
AbstractGradeRecord.getGradeAsPercentage()

isCourseGradeRecord

public boolean isCourseGradeRecord()
Specified by:
isCourseGradeRecord in class AbstractGradeRecord
Returns:
Whether this is a course grade record
See Also:
AbstractGradeRecord.isCourseGradeRecord()

getAssignment

public Assignment getAssignment()

getPercentEarned

public Double getPercentEarned()

setPercentEarned

public void setPercentEarned(Double percentEarned)

getLetterEarned

public String getLetterEarned()

setLetterEarned

public void setLetterEarned(String letterEarned)

isUserAbleToView

public boolean isUserAbleToView()

setUserAbleToView

public void setUserAbleToView(boolean userAbleToView)

clone

public AssignmentGradeRecord clone()
Overrides:
clone in class Object

isExcludedFromGrade

public Boolean isExcludedFromGrade()

setExcludedFromGrade

public void setExcludedFromGrade(Boolean isExcludedFromGrade)

getEarnedWeightedPercentage

public BigDecimal getEarnedWeightedPercentage()

setEarnedWeightedPercentage

public void setEarnedWeightedPercentage(BigDecimal earnedWeightedPercentage)

isDropped

public Boolean isDropped()

setDropped

public void setDropped(Boolean isDropped)

getOverallWeight

public BigDecimal getOverallWeight()

setOverallWeight

public void setOverallWeight(BigDecimal overallWeight)

getUserEnteredGrade

public String getUserEnteredGrade()

setUserEnteredGrade

public void setUserEnteredGrade(String userEnteredGrade)


Copyright © 2011 Sakai Project. All Rights Reserved.