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 {
30 public abstract Point getPoint();
31
44 public abstract int getLocationId();
45
58 public abstract int getSublocationId();
59
72 public abstract int getId();
73
86 public abstract String getName();
87
100 public abstract String getPhone();
101
114 public abstract String getDescript();
115
128 public abstract String getAlias();
129
142 public abstract int getCategoryId();
143
156 public abstract String getImageUrl();
157
158 private static final class CppProxy extends Venue
159 {
160 private final long nativeRef;
161 private final AtomicBoolean destroyed = new AtomicBoolean(false);
162
163 private CppProxy(long nativeRef)
164 {
165 if (nativeRef == 0) throw new RuntimeException("nativeRef is zero");
166 this.nativeRef = nativeRef;
167 }
168
169 private native void nativeDestroy(long nativeRef);
170 public void _djinni_private_destroy()
171 {
172 boolean destroyed = this.destroyed.getAndSet(true);
173 if (!destroyed) nativeDestroy(this.nativeRef);
174 }
175 protected void finalize() throws java.lang.Throwable
176 {
177 _djinni_private_destroy();
178 super.finalize();
179 }
180
181 // Venue methods
182
183 @Override
184 public Point getPoint()
185 {
186 assert !this.destroyed.get() : "trying to use a destroyed object";
187 return native_getPoint(this.nativeRef);
188 }
189 private native Point native_getPoint(long _nativeRef);
190
191 @Override
192 public int getLocationId()
193 {
194 assert !this.destroyed.get() : "trying to use a destroyed object";
195 return native_getLocationId(this.nativeRef);
196 }
197 private native int native_getLocationId(long _nativeRef);
198
199 @Override
200 public int getSublocationId()
201 {
202 assert !this.destroyed.get() : "trying to use a destroyed object";
203 return native_getSublocationId(this.nativeRef);
204 }
205 private native int native_getSublocationId(long _nativeRef);
206
207 @Override
208 public int getId()
209 {
210 assert !this.destroyed.get() : "trying to use a destroyed object";
211 return native_getId(this.nativeRef);
212 }
213 private native int native_getId(long _nativeRef);
214
215 @Override
216 public String getName()
217 {
218 assert !this.destroyed.get() : "trying to use a destroyed object";
219 return native_getName(this.nativeRef);
220 }
221 private native String native_getName(long _nativeRef);
222
223 @Override
224 public String getPhone()
225 {
226 assert !this.destroyed.get() : "trying to use a destroyed object";
227 return native_getPhone(this.nativeRef);
228 }
229 private native String native_getPhone(long _nativeRef);
230
231 @Override
232 public String getDescript()
233 {
234 assert !this.destroyed.get() : "trying to use a destroyed object";
235 return native_getDescript(this.nativeRef);
236 }
237 private native String native_getDescript(long _nativeRef);
238
239 @Override
240 public String getAlias()
241 {
242 assert !this.destroyed.get() : "trying to use a destroyed object";
243 return native_getAlias(this.nativeRef);
244 }
245 private native String native_getAlias(long _nativeRef);
246
247 @Override
248 public int getCategoryId()
249 {
250 assert !this.destroyed.get() : "trying to use a destroyed object";
251 return native_getCategoryId(this.nativeRef);
252 }
253 private native int native_getCategoryId(long _nativeRef);
254
255 @Override
256 public String getImageUrl()
257 {
258 assert !this.destroyed.get() : "trying to use a destroyed object";
259 return native_getImageUrl(this.nativeRef);
260 }
261 private native String native_getImageUrl(long _nativeRef);
262 }
263}