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 java.io.Serializable;
21 import com.google.gson.annotations.Expose;
22 import com.google.gson.annotations.SerializedName;
24 import org.hedgecode.snooker.annotation.WithHTMLTags;
25 import org.hedgecode.snooker.api.Event;
26 import org.hedgecode.snooker.api.Round;
29 * Round Entity to JSON deserialize.
31 * @author Dmitry Samoshin aka gotty
33 public class JsonRound extends JsonIdEntity implements Round, Serializable {
35 private static final long serialVersionUID = -2010008975829800984L;
37 @SerializedName("Round")
39 @SerializedName("RoundName")
40 private String roundName;
41 @SerializedName("EventID")
45 @SerializedName("MainEvent")
46 private int mainEventId;
48 private Event mainEvent;
49 @SerializedName("Distance")
51 @SerializedName("NumLeft")
53 @SerializedName("NumMatches")
54 private int numMatches;
56 @SerializedName("Note")
58 @SerializedName("ValueType")
59 private String valueType;
60 @SerializedName("Rank")
62 @SerializedName("Money")
64 @SerializedName("SeedGetsHalf")
65 private int seedGetsHalf;
66 @SerializedName("ActualMoney")
67 private long actualMoney;
68 @SerializedName("Currency")
69 private String currency;
70 @SerializedName("ConversionRate")
71 private int conversionRate;
72 @SerializedName("Points")
74 @SerializedName("SeedPoints")
75 private int seedPoints;
86 public String roundName() {
91 public int eventId() {
96 public Event event() {
100 public void setEvent(Event event) {
101 if (event != null && eventId == event.eventId())
106 public int mainEventId() {
111 public Event mainEvent() {
115 public void setMainEvent(Event mainEvent) {
116 if (mainEvent != null && mainEventId == mainEvent.eventId())
117 this.mainEvent = mainEvent;
121 public int distance() {
126 public int numLeft() {
131 public int numMatches() {
136 public String note() {
141 public String valueType() {
151 public long money() {
156 public int seedGetsHalf() {
161 public long actualMoney() {
166 public String currency() {
171 public int conversionRate() {
172 return conversionRate;
176 public int points() {
181 public int seedPoints() {