Loading...
Searching...
No Matches
Venue.java
Go to the documentation of this file.
1package com.navigine.idl.java;
2
3import java.util.concurrent.atomic.AtomicBoolean;
4
17public abstract class Venue {
31 public abstract Point getPoint();
32
46 public abstract int getLocationId();
47
61 public abstract int getSublocationId();
62
76 public abstract int getId();
77
91 public abstract String getName();
92
106 public abstract String getPhone();
107
121 public abstract String getDescript();
122
136 public abstract String getAlias();
137
151 public abstract int getCategoryId();
152
166 public abstract String getImageUrl();
167
168 private static final class CppProxy extends Venue
169 {
170 private final long nativeRef;
171 private final AtomicBoolean destroyed = new AtomicBoolean(false);
172
173 private CppProxy(long nativeRef)
174 {
175 if (nativeRef == 0) throw new RuntimeException("nativeRef is zero");
176 this.nativeRef = nativeRef;
177 }
178
179 private native void nativeDestroy(long nativeRef);
180 public void _djinni_private_destroy()
181 {
182 boolean destroyed = this.destroyed.getAndSet(true);
183 if (!destroyed) nativeDestroy(this.nativeRef);
184 }
185 protected void finalize() throws java.lang.Throwable
186 {
187 _djinni_private_destroy();
188 super.finalize();
189 }
190
191 // Venue methods
192
193 @Override
194 public Point getPoint()
195 {
196 assert !this.destroyed.get() : "trying to use a destroyed object";
197 return native_getPoint(this.nativeRef);
198 }
199 private native Point native_getPoint(long _nativeRef);
200
201 @Override
202 public int getLocationId()
203 {
204 assert !this.destroyed.get() : "trying to use a destroyed object";
205 return native_getLocationId(this.nativeRef);
206 }
207 private native int native_getLocationId(long _nativeRef);
208
209 @Override
210 public int getSublocationId()
211 {
212 assert !this.destroyed.get() : "trying to use a destroyed object";
213 return native_getSublocationId(this.nativeRef);
214 }
215 private native int native_getSublocationId(long _nativeRef);
216
217 @Override
218 public int getId()
219 {
220 assert !this.destroyed.get() : "trying to use a destroyed object";
221 return native_getId(this.nativeRef);
222 }
223 private native int native_getId(long _nativeRef);
224
225 @Override
226 public String getName()
227 {
228 assert !this.destroyed.get() : "trying to use a destroyed object";
229 return native_getName(this.nativeRef);
230 }
231 private native String native_getName(long _nativeRef);
232
233 @Override
234 public String getPhone()
235 {
236 assert !this.destroyed.get() : "trying to use a destroyed object";
237 return native_getPhone(this.nativeRef);
238 }
239 private native String native_getPhone(long _nativeRef);
240
241 @Override
242 public String getDescript()
243 {
244 assert !this.destroyed.get() : "trying to use a destroyed object";
245 return native_getDescript(this.nativeRef);
246 }
247 private native String native_getDescript(long _nativeRef);
248
249 @Override
250 public String getAlias()
251 {
252 assert !this.destroyed.get() : "trying to use a destroyed object";
253 return native_getAlias(this.nativeRef);
254 }
255 private native String native_getAlias(long _nativeRef);
256
257 @Override
258 public int getCategoryId()
259 {
260 assert !this.destroyed.get() : "trying to use a destroyed object";
261 return native_getCategoryId(this.nativeRef);
262 }
263 private native int native_getCategoryId(long _nativeRef);
264
265 @Override
266 public String getImageUrl()
267 {
268 assert !this.destroyed.get() : "trying to use a destroyed object";
269 return native_getImageUrl(this.nativeRef);
270 }
271 private native String native_getImageUrl(long _nativeRef);
272 }
273}