2 * Copyright (c) 2017-2019. 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.api.Event;
23 import org.hedgecode.snooker.api.Round;
26 * Round Entity to JSON deserialize.
28 * @author Dmitry Samoshin aka gotty
30 public class JsonRound extends JsonIdEntity implements Round {
32 @SerializedName("Round")
34 @SerializedName("RoundName")
35 private String roundName;
36 @SerializedName("EventID")
40 @SerializedName("MainEvent")
41 private int mainEventId;
43 private Event mainEvent;
44 @SerializedName("Distance")
46 @SerializedName("NumLeft")
48 @SerializedName("NumMatches")
49 private int numMatches;
50 @SerializedName("Note")
52 @SerializedName("ValueType")
53 private String valueType;
54 @SerializedName("Rank")
56 @SerializedName("Money")
58 @SerializedName("SeedGetsHalf")
59 private int seedGetsHalf;
60 @SerializedName("ActualMoney")
61 private long actualMoney;
62 @SerializedName("Currency")
63 private String currency;
64 @SerializedName("ConversionRate")
65 private int conversionRate;
66 @SerializedName("Points")
68 @SerializedName("SeedPoints")
69 private int seedPoints;
71 protected JsonRound() {
80 public String roundName() {
85 public int eventId() {
90 public Event event() {
94 public void setEvent(Event event) {
95 if (event != null && eventId == event.eventId())
100 public int mainEventId() {
105 public Event mainEvent() {
109 public void setMainEvent(Event mainEvent) {
110 if (mainEvent != null && mainEventId == mainEvent.eventId())
111 this.mainEvent = mainEvent;
115 public int distance() {
120 public int numLeft() {
125 public int numMatches() {
130 public String note() {
135 public String valueType() {
145 public long money() {
150 public int seedGetsHalf() {
155 public long actualMoney() {
160 public String currency() {
165 public int conversionRate() {
166 return conversionRate;
170 public int points() {
175 public int seedPoints() {