1
2
3
4
5
6
7
8 package com.buckosoft.BuckoVidLib.domain;
9
10 import com.buckosoft.BuckoVidLib.util.HashCodeUtil;
11
12
13
14
15
16
17
18
19 public class VideoBase {
20 private int id;
21 private int hashKey;
22 private String title;
23 private int year;
24 private int section;
25 private int sortIndex;
26 private int plexKey;
27 private long addedAt;
28
29
30
31
32
33
34
35 @Override
36 public int hashCode() {
37 int result = HashCodeUtil.SEED;
38 result = HashCodeUtil.hash(result, title);
39 result = HashCodeUtil.hash(result, year);
40 result = HashCodeUtil.hash(result, section);
41 return(result);
42 }
43
44 @Override
45 public boolean equals(Object other) {
46 if (this.year != ((VideoBase)other).year)
47 return(false);
48 if (this.section != ((VideoBase)other).section)
49 return(false);
50 if (!this.title.equals(((VideoBase)other).title))
51 return(false);
52 return(true);
53 }
54
55
56
57
58 public int getId() {
59 return id;
60 }
61
62
63
64 public void setId(int id) {
65 this.id = id;
66 }
67
68
69
70
71 public int getHashKey() {
72 return hashKey;
73 }
74
75
76
77
78 public void setHashKey(int hashKey) {
79 this.hashKey = hashKey;
80 }
81
82
83
84
85 public String getTitle() {
86 return title;
87 }
88
89
90
91 public void setTitle(String title) {
92 this.title = title;
93 }
94
95
96
97 public int getYear() {
98 return year;
99 }
100
101
102
103 public void setYear(int year) {
104 this.year = year;
105 }
106
107
108
109 public int getSection() {
110 return section;
111 }
112
113
114
115 public void setSection(int section) {
116 this.section = section;
117 }
118
119
120
121
122
123
124
125
126
127
128 public String getBackgroundUrl() {
129 return(String.format("library/metadata/%d/art", this.plexKey));
130 }
131
132
133
134
135 public int getPlexKey() {
136 return plexKey;
137 }
138
139
140
141
142 public void setPlexKey(int plexKey) {
143 this.plexKey = plexKey;
144 }
145
146
147
148
149 public long getAddedAt() {
150 return addedAt;
151 }
152
153
154
155
156 public void setAddedAt(long addedAt) {
157 this.addedAt = addedAt;
158 }
159
160
161
162
163
164 public int getSortIndex() {
165 return sortIndex;
166 }
167
168
169
170
171 public void setSortIndex(int sortIndex) {
172 this.sortIndex = sortIndex;
173 }
174
175 }