~codescore-dev/codescore/version-1.0

« back to all changes in this revision

Viewing changes to src/net/codescore/dbo/auto/_Problem.java

  • Committer: Adam Cornett
  • Date: 2008-05-16 02:53:17 UTC
  • mfrom: (65.1.52 codescore)
  • Revision ID: adam.cornett@gmail.com-20080516025317-douek1kxjabvb3wu
Merged changes from my branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
import net.codescore.dbo.Comment;
7
7
import net.codescore.dbo.Competition;
8
8
import net.codescore.dbo.JudgeSolution;
 
9
import net.codescore.dbo.ProbFigure;
 
10
import net.codescore.dbo.Tag;
9
11
import net.codescore.dbo.TeamSubmission;
10
12
import net.codescore.dbo.TestCase;
11
13
 
19
21
 
20
22
    public static final String ACTIVE_PROPERTY = "active";
21
23
    public static final String DESCRIPTION_PROPERTY = "description";
 
24
    public static final String DIFFICULTY_PROPERTY = "difficulty";
22
25
    public static final String NAME_PROPERTY = "name";
23
26
    public static final String SAMPLE_INPUT_PROPERTY = "sampleInput";
24
27
    public static final String SAMPLE_OUTPUT_PROPERTY = "sampleOutput";
25
28
    public static final String UNIX_NAME_PROPERTY = "unixName";
26
29
    public static final String COMMENTS_PROPERTY = "comments";
27
30
    public static final String COMPETITIONS_PROPERTY = "competitions";
 
31
    public static final String FIGURES_PROPERTY = "figures";
28
32
    public static final String SOLUTIONS_PROPERTY = "solutions";
29
33
    public static final String SUBMISSIONS_PROPERTY = "submissions";
 
34
    public static final String TAGS_PROPERTY = "tags";
30
35
    public static final String TEST_CASES_PROPERTY = "testCases";
31
36
 
32
 
    public static final String PROBLEM_ID_PK_COLUMN = "ProblemID";
 
37
    public static final String PROBLEMID_PK_COLUMN = "problemid";
33
38
 
34
39
    public void setActive(Boolean active) {
35
40
        writeProperty("active", active);
45
50
        return (String)readProperty("description");
46
51
    }
47
52
 
 
53
    public void setDifficulty(Short difficulty) {
 
54
        writeProperty("difficulty", difficulty);
 
55
    }
 
56
    public Short getDifficulty() {
 
57
        return (Short)readProperty("difficulty");
 
58
    }
 
59
 
48
60
    public void setName(String name) {
49
61
        writeProperty("name", name);
50
62
    }
97
109
    }
98
110
 
99
111
 
 
112
    public void addToFigures(ProbFigure obj) {
 
113
        addToManyTarget("figures", obj, true);
 
114
    }
 
115
    public void removeFromFigures(ProbFigure obj) {
 
116
        removeToManyTarget("figures", obj, true);
 
117
    }
 
118
    @SuppressWarnings("unchecked")
 
119
    public List<ProbFigure> getFigures() {
 
120
        return (List<ProbFigure>)readProperty("figures");
 
121
    }
 
122
 
 
123
 
100
124
    public void addToSolutions(JudgeSolution obj) {
101
125
        addToManyTarget("solutions", obj, true);
102
126
    }
121
145
    }
122
146
 
123
147
 
 
148
    public void addToTags(Tag obj) {
 
149
        addToManyTarget("tags", obj, true);
 
150
    }
 
151
    public void removeFromTags(Tag obj) {
 
152
        removeToManyTarget("tags", obj, true);
 
153
    }
 
154
    @SuppressWarnings("unchecked")
 
155
    public List<Tag> getTags() {
 
156
        return (List<Tag>)readProperty("tags");
 
157
    }
 
158
 
 
159
 
124
160
    public void addToTestCases(TestCase obj) {
125
161
        addToManyTarget("testCases", obj, true);
126
162
    }