Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change score related fields to double #470

Merged
merged 5 commits into from
Mar 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ public class SoftwareContestWinnerDTO extends UserDTO {
private int placement;

/**
* <p>A <code>float</code> providing the final score assigned to winner's submission.</p>
* <p>A <code>double</code> providing the final score assigned to winner's submission.</p>
*/
private float finalScore;
private double finalScore;

/**
* <p>A <code>long</code> providing the ID of a software project.</p>
Expand Down Expand Up @@ -60,18 +60,18 @@ public void setProjectId(long projectId) {
/**
* <p>Gets the final score assigned to winner's submission.</p>
*
* @return a <code>float</code> providing the final score assigned to winner's submission.
* @return a <code>double</code> providing the final score assigned to winner's submission.
*/
public float getFinalScore() {
public double getFinalScore() {
return this.finalScore;
}

/**
* <p>Sets the final score assigned to winner's submission.</p>
*
* @param finalScore a <code>float</code> providing the final score assigned to winner's submission.
* @param finalScore a <code>double</code> providing the final score assigned to winner's submission.
*/
public void setFinalScore(float finalScore) {
public void setFinalScore(double finalScore) {
this.finalScore = finalScore;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,19 @@ public class SoftwareSubmissionDTO implements Serializable {
private Date submissionDate;

/**
* <p>A <code>Float</code> providing the screening score for submission.</p>
* <p>A <code>Double</code> providing the screening score for submission.</p>
*/
private Float screeningScore;
private Double screeningScore;

/**
* <p>A <code>Float</code> providing the initial score for submission.</p>
* <p>A <code>Double</code> providing the initial score for submission.</p>
*/
private Float initialScore;
private Double initialScore;

/**
* <p>A <code>Float</code> providing the final score for submission.</p>
*/
private Float finalScore;
private Double finalScore;

/**
* <p>A <code>UserDTO</code> providing the details for the submitter.</p>
Expand Down Expand Up @@ -106,7 +106,7 @@ public class SoftwareSubmissionDTO implements Serializable {
*
* @since 1.0.2
*/
private Float checkpointReviewScore;
private Double checkpointReviewScore;

/**
* <p>Constructs new <code>SoftwareSubmissionDTO</code> instance. This implementation does nothing.</p>
Expand Down Expand Up @@ -191,54 +191,54 @@ public void setSubmitter(UserDTO submitter) {
/**
* <p>Gets the final score for submission.</p>
*
* @return a <code>Float</code> providing the final score for submission.
* @return a <code>Double</code> providing the final score for submission.
*/
public Float getFinalScore() {
public Double getFinalScore() {
return this.finalScore;
}

/**
* <p>Sets the final score for submission.</p>
*
* @param finalScore a <code>Float</code> providing the final score for submission.
* @param finalScore a <code>Double</code> providing the final score for submission.
*/
public void setFinalScore(Float finalScore) {
public void setFinalScore(Double finalScore) {
this.finalScore = finalScore;
}

/**
* <p>Gets the initial score for submission.</p>
*
* @return a <code>Float</code> providing the initial score for submission.
* @return a <code>Double</code> providing the initial score for submission.
*/
public Float getInitialScore() {
public Double getInitialScore() {
return this.initialScore;
}

/**
* <p>Sets the initial score for submission.</p>
*
* @param initialScore a <code>Float</code> providing the initial score for submission.
* @param initialScore a <code>Double</code> providing the initial score for submission.
*/
public void setInitialScore(Float initialScore) {
public void setInitialScore(Double initialScore) {
this.initialScore = initialScore;
}

/**
* <p>Gets the screening score for submission.</p>
*
* @return a <code>Float</code> providing the screening score for submission.
* @return a <code>Double</code> providing the screening score for submission.
*/
public Float getScreeningScore() {
public Double getScreeningScore() {
return this.screeningScore;
}

/**
* <p>Sets the screening score for submission.</p>
*
* @param screeningScore a <code>Float</code> providing the screening score for submission.
* @param screeningScore a <code>Double</code> providing the screening score for submission.
*/
public void setScreeningScore(Float screeningScore) {
public void setScreeningScore(Double screeningScore) {
this.screeningScore = screeningScore;
}

Expand Down Expand Up @@ -360,7 +360,7 @@ public String getCheckpointFeedback() {
* @param checkpointReviewScore the checkpoint review score for the checkpoint submission to set
* @since 1.0.2
*/
public void setCheckpointReviewScore(Float checkpointReviewScore) {
public void setCheckpointReviewScore(Double checkpointReviewScore) {
this.checkpointReviewScore = checkpointReviewScore;
}

Expand All @@ -370,7 +370,7 @@ public void setCheckpointReviewScore(Float checkpointReviewScore) {
* @return the checkpoint review score for the checkpoint submission
* @since 1.0.2
*/
public Float getCheckpointReviewScore() {
public Double getCheckpointReviewScore() {
return checkpointReviewScore;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ public class SoftwareSubmissionReviewDTO implements Serializable {
private UserDTO reviewer;

/**
* <p>A <code>Float</code> providing the review final score.</p>
* <p>A <code>Double</code> providing the review final score.</p>
*/
private Float finalScore;
private Double finalScore;

/**
* <p>A <code>long</code> providing the ID of submission associated with this review.</p>
Expand All @@ -44,9 +44,9 @@ public class SoftwareSubmissionReviewDTO implements Serializable {
private long reviewId;

/**
* <p>A <code>Float</code> providing the initial score for review.</p>
* <p>A <code>Double</code> providing the initial score for review.</p>
*/
private Float initialScore;
private Double initialScore;

/**
* <p>A <code>String</code> providing the feedback for the checkpoint submission.</p>
Expand All @@ -64,9 +64,9 @@ public SoftwareSubmissionReviewDTO() {
/**
* <p>Gets the initial score for review.</p>
*
* @return a <code>Float</code> providing the initial score for review.
* @return a <code>Double</code> providing the initial score for review.
*/
public Float getInitialScore() {
public Double getInitialScore() {
return this.initialScore;
}

Expand Down Expand Up @@ -96,9 +96,9 @@ public void setCommitted(boolean committed) {
/**
* <p>Sets the initial score for review.</p>
*
* @param initialScore a <code>Float</code> providing the initial score for review.
* @param initialScore a <code>Double</code> providing the initial score for review.
*/
public void setInitialScore(Float initialScore) {
public void setInitialScore(Double initialScore) {
this.initialScore = initialScore;
}

Expand Down Expand Up @@ -141,18 +141,18 @@ public void setSubmissionId(long submissionId) {
/**
* <p>Gets the review final score.</p>
*
* @return a <code>Float</code> providing the review final score.
* @return a <code>Double</code> providing the review final score.
*/
public Float getFinalScore() {
public Double getFinalScore() {
return this.finalScore;
}

/**
* <p>Sets the review final score.</p>
*
* @param finalScore a <code>Float</code> providing the review final score.
* @param finalScore a <code>Double</code> providing the review final score.
*/
public void setFinalScore(Float finalScore) {
public void setFinalScore(Double finalScore) {
this.finalScore = finalScore;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2382,7 +2382,7 @@ public static ProjectStatsDTO getProjectStats(TCSubject tcSubject, long projectI
* @param projectId the direct project id.
* @param clientId the client id.
* @param billingAccountId the billing accounts id.
* @param projectStatus the project status.
* @param projectStatusIds the project status ids.
* @param startDate the start date.
* @param endDate the end date.
* @param statses the project metrics data.
Expand Down Expand Up @@ -2988,9 +2988,9 @@ public static void setSoftwareCheckpointSubmissionsData(SoftwareContestSubmissio
checkpointReview.setReviewId(reviewRow.getLongItem("review_id"));
checkpointReview.setCommitted(reviewRow.getBooleanItem("is_committed"));
checkpointReview.setFinalScore(reviewRow.getItem("final_score").getResultData() == null ? 0 :
reviewRow.getFloatItem("final_score"));
reviewRow.getDoubleItem("final_score"));
checkpointReview.setInitialScore(reviewRow.getItem("initial_score").getResultData() == null ? 0 :
reviewRow.getFloatItem("initial_score"));
reviewRow.getDoubleItem("initial_score"));
checkpointReview.setCheckpointFeedback(reviewRow.getStringItem("feedback"));

long submissionId = checkpointReview.getSubmissionId();
Expand Down Expand Up @@ -3024,10 +3024,10 @@ public static void setSoftwareCheckpointSubmissionsData(SoftwareContestSubmissio
long submissionId = submissionRow.getLongItem("submission_id");
submission.setSubmissionId(submissionId);
submission.setSubmissionDate(submissionRow.getTimestampItem("create_date"));
submission.setScreeningScore((Float) submissionRow.getItem("screening_score").getResultData());
submission.setInitialScore((Float) submissionRow.getItem("initial_score").getResultData());
submission.setFinalScore((Float) submissionRow.getItem("final_score").getResultData());
submission.setPlacement((Integer) submissionRow.getItem("placement").getResultData());
submission.setScreeningScore(submissionRow.getItem("screening_score").getResultData() == null ? null : submissionRow.getDoubleItem("screening_score"));
submission.setInitialScore(submissionRow.getItem("initial_score").getResultData() == null ? null : submissionRow.getDoubleItem("initial_score"));
submission.setFinalScore(submissionRow.getItem("final_score").getResultData() == null ? null : submissionRow.getDoubleItem("final_score"));
submission.setPlacement(submissionRow.getItem("placement").getResultData() == null ? null : submissionRow.getIntItem("placement"));
submission.setPassedScreening(!submissionRow.getBooleanItem("failed_milestone_screening"));
submission.setPassedReview(!submissionRow.getBooleanItem("failed_milestone_review"));
submission.setUploadId(submissionRow.getLongItem("upload_id"));
Expand Down Expand Up @@ -3107,8 +3107,8 @@ public static void setSoftwareSubmissionsData(SoftwareContestSubmissionsDTO dto)
SoftwareSubmissionReviewDTO review = new SoftwareSubmissionReviewDTO();
review.setReviewer(reviewersMap.get(reviewRow.getLongItem("resource_id")));
review.setSubmissionId(reviewRow.getLongItem("submission_id"));
review.setFinalScore(reviewRow.getFloatItem("final_score"));
review.setInitialScore(reviewRow.getFloatItem("initial_score"));
review.setFinalScore(reviewRow.getDoubleItem("final_score"));
review.setInitialScore(reviewRow.getDoubleItem("initial_score"));
review.setReviewId(reviewRow.getLongItem("review_id"));
review.setCommitted(reviewRow.getBooleanItem("is_committed"));
long reviewerRoleId = reviewRow.getLongItem("reviewer_role_id");
Expand Down Expand Up @@ -3144,10 +3144,10 @@ public static void setSoftwareSubmissionsData(SoftwareContestSubmissionsDTO dto)
long submissionId = submissionRow.getLongItem("submission_id");
submission.setSubmissionId(submissionId);
submission.setSubmissionDate(submissionRow.getTimestampItem("create_date"));
submission.setScreeningScore((Float) submissionRow.getItem("screening_score").getResultData());
submission.setInitialScore((Float) submissionRow.getItem("initial_score").getResultData());
submission.setFinalScore((Float) submissionRow.getItem("final_score").getResultData());
submission.setPlacement((Integer) submissionRow.getItem("placement").getResultData());
submission.setScreeningScore(submissionRow.getItem("screening_score").getResultData() == null ? null : submissionRow.getDoubleItem("screening_score"));
submission.setInitialScore(submissionRow.getItem("initial_score").getResultData() == null ? null : submissionRow.getDoubleItem("initial_score"));
submission.setFinalScore(submissionRow.getItem("final_score").getResultData() == null ? null : submissionRow.getDoubleItem("final_score"));
submission.setPlacement(submissionRow.getItem("placement").getResultData() == null ? null : submissionRow.getIntItem("placement"));
submission.setPassedScreening(!submissionRow.getBooleanItem("failed_screening"));
submission.setPassedReview(!submissionRow.getBooleanItem("failed_review"));
submission.setUploadId(submissionRow.getLongItem("upload_id"));
Expand Down