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 {
21 public abstract Point getPoint();
22
26 public abstract int getLocationId();
27
31 public abstract int getSublocationId();
32
36 public abstract int getId();
37
41 public abstract String getName();
42
46 public abstract String getPhone();
47
51 public abstract String getDescript();
52
56 public abstract String getAlias();
57
61 public abstract int getCategoryId();
62
66 public abstract String getImageUrl();
67
68 private static final class CppProxy extends Venue
69 {
70 private final long nativeRef;
71 private final AtomicBoolean destroyed = new AtomicBoolean(false);
72
73 private CppProxy(long nativeRef)
74 {
75 if (nativeRef == 0) throw new RuntimeException("nativeRef is zero");
76 this.nativeRef = nativeRef;
77 }
78
79 private native void nativeDestroy(long nativeRef);
80 public void _djinni_private_destroy()
81 {
82 boolean destroyed = this.destroyed.getAndSet(true);
83 if (!destroyed) nativeDestroy(this.nativeRef);
84 }
85 protected void finalize() throws java.lang.Throwable
86 {
87 _djinni_private_destroy();
88 super.finalize();
89 }
90
91 // Venue methods
92
93 @Override
94 public Point getPoint()
95 {
96 assert !this.destroyed.get() : "trying to use a destroyed object";
97 return native_getPoint(this.nativeRef);
98 }
99 private native Point native_getPoint(long _nativeRef);
100
101 @Override
102 public int getLocationId()
103 {
104 assert !this.destroyed.get() : "trying to use a destroyed object";
105 return native_getLocationId(this.nativeRef);
106 }
107 private native int native_getLocationId(long _nativeRef);
108
109 @Override
110 public int getSublocationId()
111 {
112 assert !this.destroyed.get() : "trying to use a destroyed object";
113 return native_getSublocationId(this.nativeRef);
114 }
115 private native int native_getSublocationId(long _nativeRef);
116
117 @Override
118 public int getId()
119 {
120 assert !this.destroyed.get() : "trying to use a destroyed object";
121 return native_getId(this.nativeRef);
122 }
123 private native int native_getId(long _nativeRef);
124
125 @Override
126 public String getName()
127 {
128 assert !this.destroyed.get() : "trying to use a destroyed object";
129 return native_getName(this.nativeRef);
130 }
131 private native String native_getName(long _nativeRef);
132
133 @Override
134 public String getPhone()
135 {
136 assert !this.destroyed.get() : "trying to use a destroyed object";
137 return native_getPhone(this.nativeRef);
138 }
139 private native String native_getPhone(long _nativeRef);
140
141 @Override
142 public String getDescript()
143 {
144 assert !this.destroyed.get() : "trying to use a destroyed object";
145 return native_getDescript(this.nativeRef);
146 }
147 private native String native_getDescript(long _nativeRef);
148
149 @Override
150 public String getAlias()
151 {
152 assert !this.destroyed.get() : "trying to use a destroyed object";
153 return native_getAlias(this.nativeRef);
154 }
155 private native String native_getAlias(long _nativeRef);
156
157 @Override
158 public int getCategoryId()
159 {
160 assert !this.destroyed.get() : "trying to use a destroyed object";
161 return native_getCategoryId(this.nativeRef);
162 }
163 private native int native_getCategoryId(long _nativeRef);
164
165 @Override
166 public String getImageUrl()
167 {
168 assert !this.destroyed.get() : "trying to use a destroyed object";
169 return native_getImageUrl(this.nativeRef);
170 }
171 private native String native_getImageUrl(long _nativeRef);
172 }
173}