2 * Copyright (c) 2017-2020. Developed by Hedgecode.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package org.hedgecode.snooker.json;
19 import com.google.gson.annotations.Expose;
20 import com.google.gson.annotations.SerializedName;
22 import org.hedgecode.snooker.annotation.WithHTMLTags;
23 import org.hedgecode.snooker.api.Event;
24 import org.hedgecode.snooker.api.Round;
27 * Round Entity to JSON deserialize.
29 * @author Dmitry Samoshin aka gotty
31 public class JsonRound extends JsonIdEntity implements Round {
33 @SerializedName("Round")
35 @SerializedName("RoundName")
36 private String roundName;
37 @SerializedName("EventID")
41 @SerializedName("MainEvent")
42 private int mainEventId;
44 private Event mainEvent;
45 @SerializedName("Distance")
47 @SerializedName("NumLeft")
49 @SerializedName("NumMatches")
50 private int numMatches;
52 @SerializedName("Note")
54 @SerializedName("ValueType")
55 private String valueType;
56 @SerializedName("Rank")
58 @SerializedName("Money")
60 @SerializedName("SeedGetsHalf")
61 private int seedGetsHalf;
62 @SerializedName("ActualMoney")
63 private long actualMoney;
64 @SerializedName("Currency")
65 private String currency;
66 @SerializedName("ConversionRate")
67 private int conversionRate;
68 @SerializedName("Points")
70 @SerializedName("SeedPoints")
71 private int seedPoints;
73 protected JsonRound() {
82 public String roundName() {
87 public int eventId() {
92 public Event event() {
96 public void setEvent(Event event) {
97 if (event != null && eventId == event.eventId())
102 public int mainEventId() {
107 public Event mainEvent() {
111 public void setMainEvent(Event mainEvent) {
112 if (mainEvent != null && mainEventId == mainEvent.eventId())
113 this.mainEvent = mainEvent;
117 public int distance() {
122 public int numLeft() {
127 public int numMatches() {
132 public String note() {
137 public String valueType() {
147 public long money() {
152 public int seedGetsHalf() {
157 public long actualMoney() {
162 public String currency() {
167 public int conversionRate() {
168 return conversionRate;
172 public int points() {
177 public int seedPoints() {