Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Commit fcf69e7

Browse files
authored
Merge pull request #471 from appirio-tech/dev
Add support for increased precision on score fields
2 parents 5b1be56 + 68b7418 commit fcf69e7

File tree

5 files changed

+51
-70
lines changed

5 files changed

+51
-70
lines changed

conf/web/WEB-INF/struts.xml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -273,25 +273,6 @@
273273
</result>
274274
</action>
275275

276-
<action name="getTopCoderRoadMap" class="publicTopCoderRoadmap">
277-
<interceptor-ref name="preProcessorStack"/>
278-
<result name="success" type="json"/>
279-
<result name="error" type="json"/>
280-
</action>
281-
282-
<action name="TopCoderRoadmap">
283-
<interceptor-ref name="defaultStack"/>
284-
<result name="success">/WEB-INF/public-roadmap.jsp</result>
285-
</action>
286-
287-
<action name="TopCoderRoadmapRSS" method="getClientRoadMapRSS" class="publicTopCoderRoadmap">
288-
<interceptor-ref name="preProcessorStack"/>
289-
<result name="success" type="stream">
290-
<param name="contentType">text/xml</param>
291-
<param name="inputName">rssFeed</param>
292-
</result>
293-
</action>
294-
295276
<action name="instantSearch" method="instantSearch" class="instantSearchAction">
296277
<interceptor-ref name="securedDefaultStack"/>
297278
<result name="success" type="json"/>

src/java/main/com/topcoder/direct/services/view/dto/SoftwareContestWinnerDTO.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ public class SoftwareContestWinnerDTO extends UserDTO {
1919
private int placement;
2020

2121
/**
22-
* <p>A <code>float</code> providing the final score assigned to winner's submission.</p>
22+
* <p>A <code>double</code> providing the final score assigned to winner's submission.</p>
2323
*/
24-
private float finalScore;
24+
private double finalScore;
2525

2626
/**
2727
* <p>A <code>long</code> providing the ID of a software project.</p>
@@ -60,18 +60,18 @@ public void setProjectId(long projectId) {
6060
/**
6161
* <p>Gets the final score assigned to winner's submission.</p>
6262
*
63-
* @return a <code>float</code> providing the final score assigned to winner's submission.
63+
* @return a <code>double</code> providing the final score assigned to winner's submission.
6464
*/
65-
public float getFinalScore() {
65+
public double getFinalScore() {
6666
return this.finalScore;
6767
}
6868

6969
/**
7070
* <p>Sets the final score assigned to winner's submission.</p>
7171
*
72-
* @param finalScore a <code>float</code> providing the final score assigned to winner's submission.
72+
* @param finalScore a <code>double</code> providing the final score assigned to winner's submission.
7373
*/
74-
public void setFinalScore(float finalScore) {
74+
public void setFinalScore(double finalScore) {
7575
this.finalScore = finalScore;
7676
}
7777

src/java/main/com/topcoder/direct/services/view/dto/contest/SoftwareSubmissionDTO.java

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,19 @@ public class SoftwareSubmissionDTO implements Serializable {
4242
private Date submissionDate;
4343

4444
/**
45-
* <p>A <code>Float</code> providing the screening score for submission.</p>
45+
* <p>A <code>Double</code> providing the screening score for submission.</p>
4646
*/
47-
private Float screeningScore;
47+
private Double screeningScore;
4848

4949
/**
50-
* <p>A <code>Float</code> providing the initial score for submission.</p>
50+
* <p>A <code>Double</code> providing the initial score for submission.</p>
5151
*/
52-
private Float initialScore;
52+
private Double initialScore;
5353

5454
/**
5555
* <p>A <code>Float</code> providing the final score for submission.</p>
5656
*/
57-
private Float finalScore;
57+
private Double finalScore;
5858

5959
/**
6060
* <p>A <code>UserDTO</code> providing the details for the submitter.</p>
@@ -106,7 +106,7 @@ public class SoftwareSubmissionDTO implements Serializable {
106106
*
107107
* @since 1.0.2
108108
*/
109-
private Float checkpointReviewScore;
109+
private Double checkpointReviewScore;
110110

111111
/**
112112
* <p>Constructs new <code>SoftwareSubmissionDTO</code> instance. This implementation does nothing.</p>
@@ -191,54 +191,54 @@ public void setSubmitter(UserDTO submitter) {
191191
/**
192192
* <p>Gets the final score for submission.</p>
193193
*
194-
* @return a <code>Float</code> providing the final score for submission.
194+
* @return a <code>Double</code> providing the final score for submission.
195195
*/
196-
public Float getFinalScore() {
196+
public Double getFinalScore() {
197197
return this.finalScore;
198198
}
199199

200200
/**
201201
* <p>Sets the final score for submission.</p>
202202
*
203-
* @param finalScore a <code>Float</code> providing the final score for submission.
203+
* @param finalScore a <code>Double</code> providing the final score for submission.
204204
*/
205-
public void setFinalScore(Float finalScore) {
205+
public void setFinalScore(Double finalScore) {
206206
this.finalScore = finalScore;
207207
}
208208

209209
/**
210210
* <p>Gets the initial score for submission.</p>
211211
*
212-
* @return a <code>Float</code> providing the initial score for submission.
212+
* @return a <code>Double</code> providing the initial score for submission.
213213
*/
214-
public Float getInitialScore() {
214+
public Double getInitialScore() {
215215
return this.initialScore;
216216
}
217217

218218
/**
219219
* <p>Sets the initial score for submission.</p>
220220
*
221-
* @param initialScore a <code>Float</code> providing the initial score for submission.
221+
* @param initialScore a <code>Double</code> providing the initial score for submission.
222222
*/
223-
public void setInitialScore(Float initialScore) {
223+
public void setInitialScore(Double initialScore) {
224224
this.initialScore = initialScore;
225225
}
226226

227227
/**
228228
* <p>Gets the screening score for submission.</p>
229229
*
230-
* @return a <code>Float</code> providing the screening score for submission.
230+
* @return a <code>Double</code> providing the screening score for submission.
231231
*/
232-
public Float getScreeningScore() {
232+
public Double getScreeningScore() {
233233
return this.screeningScore;
234234
}
235235

236236
/**
237237
* <p>Sets the screening score for submission.</p>
238238
*
239-
* @param screeningScore a <code>Float</code> providing the screening score for submission.
239+
* @param screeningScore a <code>Double</code> providing the screening score for submission.
240240
*/
241-
public void setScreeningScore(Float screeningScore) {
241+
public void setScreeningScore(Double screeningScore) {
242242
this.screeningScore = screeningScore;
243243
}
244244

@@ -360,7 +360,7 @@ public String getCheckpointFeedback() {
360360
* @param checkpointReviewScore the checkpoint review score for the checkpoint submission to set
361361
* @since 1.0.2
362362
*/
363-
public void setCheckpointReviewScore(Float checkpointReviewScore) {
363+
public void setCheckpointReviewScore(Double checkpointReviewScore) {
364364
this.checkpointReviewScore = checkpointReviewScore;
365365
}
366366

@@ -370,7 +370,7 @@ public void setCheckpointReviewScore(Float checkpointReviewScore) {
370370
* @return the checkpoint review score for the checkpoint submission
371371
* @since 1.0.2
372372
*/
373-
public Float getCheckpointReviewScore() {
373+
public Double getCheckpointReviewScore() {
374374
return checkpointReviewScore;
375375
}
376376

src/java/main/com/topcoder/direct/services/view/dto/contest/SoftwareSubmissionReviewDTO.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ public class SoftwareSubmissionReviewDTO implements Serializable {
2929
private UserDTO reviewer;
3030

3131
/**
32-
* <p>A <code>Float</code> providing the review final score.</p>
32+
* <p>A <code>Double</code> providing the review final score.</p>
3333
*/
34-
private Float finalScore;
34+
private Double finalScore;
3535

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

4646
/**
47-
* <p>A <code>Float</code> providing the initial score for review.</p>
47+
* <p>A <code>Double</code> providing the initial score for review.</p>
4848
*/
49-
private Float initialScore;
49+
private Double initialScore;
5050

5151
/**
5252
* <p>A <code>String</code> providing the feedback for the checkpoint submission.</p>
@@ -64,9 +64,9 @@ public SoftwareSubmissionReviewDTO() {
6464
/**
6565
* <p>Gets the initial score for review.</p>
6666
*
67-
* @return a <code>Float</code> providing the initial score for review.
67+
* @return a <code>Double</code> providing the initial score for review.
6868
*/
69-
public Float getInitialScore() {
69+
public Double getInitialScore() {
7070
return this.initialScore;
7171
}
7272

@@ -96,9 +96,9 @@ public void setCommitted(boolean committed) {
9696
/**
9797
* <p>Sets the initial score for review.</p>
9898
*
99-
* @param initialScore a <code>Float</code> providing the initial score for review.
99+
* @param initialScore a <code>Double</code> providing the initial score for review.
100100
*/
101-
public void setInitialScore(Float initialScore) {
101+
public void setInitialScore(Double initialScore) {
102102
this.initialScore = initialScore;
103103
}
104104

@@ -141,18 +141,18 @@ public void setSubmissionId(long submissionId) {
141141
/**
142142
* <p>Gets the review final score.</p>
143143
*
144-
* @return a <code>Float</code> providing the review final score.
144+
* @return a <code>Double</code> providing the review final score.
145145
*/
146-
public Float getFinalScore() {
146+
public Double getFinalScore() {
147147
return this.finalScore;
148148
}
149149

150150
/**
151151
* <p>Sets the review final score.</p>
152152
*
153-
* @param finalScore a <code>Float</code> providing the review final score.
153+
* @param finalScore a <code>Double</code> providing the review final score.
154154
*/
155-
public void setFinalScore(Float finalScore) {
155+
public void setFinalScore(Double finalScore) {
156156
this.finalScore = finalScore;
157157
}
158158

src/java/main/com/topcoder/direct/services/view/util/DataProvider.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2382,7 +2382,7 @@ public static ProjectStatsDTO getProjectStats(TCSubject tcSubject, long projectI
23822382
* @param projectId the direct project id.
23832383
* @param clientId the client id.
23842384
* @param billingAccountId the billing accounts id.
2385-
* @param projectStatus the project status.
2385+
* @param projectStatusIds the project status ids.
23862386
* @param startDate the start date.
23872387
* @param endDate the end date.
23882388
* @param statses the project metrics data.
@@ -2988,9 +2988,9 @@ public static void setSoftwareCheckpointSubmissionsData(SoftwareContestSubmissio
29882988
checkpointReview.setReviewId(reviewRow.getLongItem("review_id"));
29892989
checkpointReview.setCommitted(reviewRow.getBooleanItem("is_committed"));
29902990
checkpointReview.setFinalScore(reviewRow.getItem("final_score").getResultData() == null ? 0 :
2991-
reviewRow.getFloatItem("final_score"));
2991+
reviewRow.getDoubleItem("final_score"));
29922992
checkpointReview.setInitialScore(reviewRow.getItem("initial_score").getResultData() == null ? 0 :
2993-
reviewRow.getFloatItem("initial_score"));
2993+
reviewRow.getDoubleItem("initial_score"));
29942994
checkpointReview.setCheckpointFeedback(reviewRow.getStringItem("feedback"));
29952995

29962996
long submissionId = checkpointReview.getSubmissionId();
@@ -3024,10 +3024,10 @@ public static void setSoftwareCheckpointSubmissionsData(SoftwareContestSubmissio
30243024
long submissionId = submissionRow.getLongItem("submission_id");
30253025
submission.setSubmissionId(submissionId);
30263026
submission.setSubmissionDate(submissionRow.getTimestampItem("create_date"));
3027-
submission.setScreeningScore((Float) submissionRow.getItem("screening_score").getResultData());
3028-
submission.setInitialScore((Float) submissionRow.getItem("initial_score").getResultData());
3029-
submission.setFinalScore((Float) submissionRow.getItem("final_score").getResultData());
3030-
submission.setPlacement((Integer) submissionRow.getItem("placement").getResultData());
3027+
submission.setScreeningScore(submissionRow.getItem("screening_score").getResultData() == null ? null : submissionRow.getDoubleItem("screening_score"));
3028+
submission.setInitialScore(submissionRow.getItem("initial_score").getResultData() == null ? null : submissionRow.getDoubleItem("initial_score"));
3029+
submission.setFinalScore(submissionRow.getItem("final_score").getResultData() == null ? null : submissionRow.getDoubleItem("final_score"));
3030+
submission.setPlacement(submissionRow.getItem("placement").getResultData() == null ? null : submissionRow.getIntItem("placement"));
30313031
submission.setPassedScreening(!submissionRow.getBooleanItem("failed_milestone_screening"));
30323032
submission.setPassedReview(!submissionRow.getBooleanItem("failed_milestone_review"));
30333033
submission.setUploadId(submissionRow.getLongItem("upload_id"));
@@ -3107,8 +3107,8 @@ public static void setSoftwareSubmissionsData(SoftwareContestSubmissionsDTO dto)
31073107
SoftwareSubmissionReviewDTO review = new SoftwareSubmissionReviewDTO();
31083108
review.setReviewer(reviewersMap.get(reviewRow.getLongItem("resource_id")));
31093109
review.setSubmissionId(reviewRow.getLongItem("submission_id"));
3110-
review.setFinalScore(reviewRow.getFloatItem("final_score"));
3111-
review.setInitialScore(reviewRow.getFloatItem("initial_score"));
3110+
review.setFinalScore(reviewRow.getDoubleItem("final_score"));
3111+
review.setInitialScore(reviewRow.getDoubleItem("initial_score"));
31123112
review.setReviewId(reviewRow.getLongItem("review_id"));
31133113
review.setCommitted(reviewRow.getBooleanItem("is_committed"));
31143114
long reviewerRoleId = reviewRow.getLongItem("reviewer_role_id");
@@ -3144,10 +3144,10 @@ public static void setSoftwareSubmissionsData(SoftwareContestSubmissionsDTO dto)
31443144
long submissionId = submissionRow.getLongItem("submission_id");
31453145
submission.setSubmissionId(submissionId);
31463146
submission.setSubmissionDate(submissionRow.getTimestampItem("create_date"));
3147-
submission.setScreeningScore((Float) submissionRow.getItem("screening_score").getResultData());
3148-
submission.setInitialScore((Float) submissionRow.getItem("initial_score").getResultData());
3149-
submission.setFinalScore((Float) submissionRow.getItem("final_score").getResultData());
3150-
submission.setPlacement((Integer) submissionRow.getItem("placement").getResultData());
3147+
submission.setScreeningScore(submissionRow.getItem("screening_score").getResultData() == null ? null : submissionRow.getDoubleItem("screening_score"));
3148+
submission.setInitialScore(submissionRow.getItem("initial_score").getResultData() == null ? null : submissionRow.getDoubleItem("initial_score"));
3149+
submission.setFinalScore(submissionRow.getItem("final_score").getResultData() == null ? null : submissionRow.getDoubleItem("final_score"));
3150+
submission.setPlacement(submissionRow.getItem("placement").getResultData() == null ? null : submissionRow.getIntItem("placement"));
31513151
submission.setPassedScreening(!submissionRow.getBooleanItem("failed_screening"));
31523152
submission.setPassedReview(!submissionRow.getBooleanItem("failed_review"));
31533153
submission.setUploadId(submissionRow.getLongItem("upload_id"));

0 commit comments

Comments
 (0)