|
19 | 19 | super(requestUrl, client, requestOptions, <#=ReturnType(c)#>.class); |
20 | 20 | } |
21 | 21 |
|
22 | | -<# if (c.AsOdcmMethod().IsAction()) { #> |
23 | | -<# if (c.AsOdcmMethod().ReturnType != null) { #> |
| 22 | +<# |
| 23 | +if (c.AsOdcmMethod().IsAction()) { |
| 24 | + if (c.AsOdcmMethod().ReturnType != null) { |
| 25 | +#> |
24 | 26 | /** |
25 | 27 | * Creates the <#=ReturnType(c)#> |
26 | 28 | * |
|
40 | 42 | return send(HttpMethod.POST, null); |
41 | 43 | } |
42 | 44 |
|
43 | | -<# if (c.GetFeatures().CanSelect) { #> |
| 45 | +<# |
| 46 | + if (c.GetFeatures().CanSelect) { |
| 47 | +#> |
44 | 48 | /** |
45 | 49 | * Sets the select clause for the request |
46 | 50 | * |
|
52 | 56 | return (<#=TypeRequest(c)#>)this; |
53 | 57 | } |
54 | 58 |
|
55 | | -<# } #> |
56 | | -<# if (c.GetFeatures().CanExpand) { #> |
| 59 | +<# |
| 60 | + } |
| 61 | + |
| 62 | + if (c.GetFeatures().CanExpand) { |
| 63 | +#> |
57 | 64 | /** |
58 | 65 | * Sets the expand clause for the request |
59 | 66 | * |
|
65 | 72 | return (<#=TypeRequest(c)#>)this; |
66 | 73 | } |
67 | 74 |
|
68 | | -<# } #> |
69 | | -<# if (c.AsOdcmProperty() != null && c.AsOdcmProperty().IsCollection && c.GetFeatures().CanUseTop) { #> |
| 75 | +<# |
| 76 | + } |
| 77 | + |
| 78 | + if (c.AsOdcmProperty() != null && c.AsOdcmProperty().IsCollection && c.GetFeatures().CanUseTop) { |
| 79 | +#> |
70 | 80 |
|
71 | 81 | /** |
72 | 82 | * Sets the top value for the request |
|
78 | 88 | getQueryOptions().add(new QueryOption("$top", value+"")); |
79 | 89 | return (<#=TypeRequest(c)#>)this; |
80 | 90 | } |
81 | | -<# } #> |
82 | | -<# } else { #> |
| 91 | +<# |
| 92 | + } |
| 93 | + } else { |
| 94 | +#> |
83 | 95 | /** |
84 | 96 | * Creates the <#=ReturnType(c)#> |
85 | 97 | * |
|
109 | 121 | public void post() throws ClientException { |
110 | 122 | this.send(HttpMethod.POST, null); |
111 | 123 | } |
112 | | -<# } #> |
113 | | -<# } else { #> |
114 | | -<# if (c.AsOdcmMethod().ReturnType != null) { #> |
| 124 | +<# |
| 125 | + } |
| 126 | +} else { |
| 127 | + if (c.AsOdcmMethod().ReturnType != null) { |
| 128 | +#> |
115 | 129 | /** |
116 | 130 | * Gets the <#=ReturnType(c)#> |
117 | 131 | * |
|
131 | 145 | return send(HttpMethod.GET, null); |
132 | 146 | } |
133 | 147 |
|
134 | | -<# if (c.GetFeatures().CanSelect) { #> |
| 148 | +<# |
| 149 | + if (c.GetFeatures().CanSelect) { |
| 150 | +#> |
135 | 151 | /** |
136 | 152 | * Sets the select clause for the request |
137 | 153 | * |
|
143 | 159 | return (<#=TypeRequest(c)#>)this; |
144 | 160 | } |
145 | 161 |
|
146 | | -<# } #> |
147 | | -<# if (c.GetFeatures().CanExpand) { #> |
| 162 | +<# |
| 163 | + } |
| 164 | + |
| 165 | + if (c.GetFeatures().CanExpand) { |
| 166 | +#> |
148 | 167 | /** |
149 | 168 | * Sets the expand clause for the request |
150 | 169 | * |
|
156 | 175 | return (<#=TypeRequest(c)#>)this; |
157 | 176 | } |
158 | 177 |
|
159 | | -<# } #> |
160 | | -<# if (c.AsOdcmProperty() != null && c.AsOdcmProperty().IsCollection && c.GetFeatures().CanUseTop) { #> |
| 178 | +<# |
| 179 | + } |
| 180 | + |
| 181 | + if (c.AsOdcmProperty() != null && c.AsOdcmProperty().IsCollection && c.GetFeatures().CanUseTop) { |
| 182 | +#> |
161 | 183 |
|
162 | 184 | /** |
163 | 185 | * Sets the top value for the request |
|
169 | 191 | getQueryOptions().add(new QueryOption("$top", value+"")); |
170 | 192 | return (<#=TypeRequest(c)#>)this; |
171 | 193 | } |
172 | | -<# } #> |
173 | | -<# } else { #> |
| 194 | +<# |
| 195 | + } |
| 196 | + } else { |
| 197 | +#> |
174 | 198 | public void get(final ICallback<Void> callback) { |
175 | 199 | final IExecutors executors = getClient().getExecutors(); |
176 | 200 | executors.performOnBackground(new Runnable() { |
|
189 | 213 | public void get() throws ClientException { |
190 | 214 | this.send(HttpMethod.GET, null); |
191 | 215 | } |
192 | | -<# } #> |
193 | | -<# } #> |
| 216 | +<# |
| 217 | + } |
| 218 | +} |
| 219 | +#> |
194 | 220 | } |
0 commit comments