Skip to content

Commit da4657b

Browse files
author
Brian Melton
committed
Formatting fixes in prep for PATCH/PUT
1 parent abc01c8 commit da4657b

File tree

1 file changed

+47
-21
lines changed

1 file changed

+47
-21
lines changed

Templates/Android/generated/BaseMethodRequest.java.tt

Lines changed: 47 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@
1919
super(requestUrl, client, requestOptions, <#=ReturnType(c)#>.class);
2020
}
2121

22-
<# if (c.AsOdcmMethod().IsAction()) { #>
23-
<# if (c.AsOdcmMethod().ReturnType != null) { #>
22+
<#
23+
if (c.AsOdcmMethod().IsAction()) {
24+
if (c.AsOdcmMethod().ReturnType != null) {
25+
#>
2426
/**
2527
* Creates the <#=ReturnType(c)#>
2628
*
@@ -40,7 +42,9 @@
4042
return send(HttpMethod.POST, null);
4143
}
4244

43-
<# if (c.GetFeatures().CanSelect) { #>
45+
<#
46+
if (c.GetFeatures().CanSelect) {
47+
#>
4448
/**
4549
* Sets the select clause for the request
4650
*
@@ -52,8 +56,11 @@
5256
return (<#=TypeRequest(c)#>)this;
5357
}
5458

55-
<# } #>
56-
<# if (c.GetFeatures().CanExpand) { #>
59+
<#
60+
}
61+
62+
if (c.GetFeatures().CanExpand) {
63+
#>
5764
/**
5865
* Sets the expand clause for the request
5966
*
@@ -65,8 +72,11 @@
6572
return (<#=TypeRequest(c)#>)this;
6673
}
6774

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+
#>
7080

7181
/**
7282
* Sets the top value for the request
@@ -78,8 +88,10 @@
7888
getQueryOptions().add(new QueryOption("$top", value+""));
7989
return (<#=TypeRequest(c)#>)this;
8090
}
81-
<# } #>
82-
<# } else { #>
91+
<#
92+
}
93+
} else {
94+
#>
8395
/**
8496
* Creates the <#=ReturnType(c)#>
8597
*
@@ -109,9 +121,11 @@
109121
public void post() throws ClientException {
110122
this.send(HttpMethod.POST, null);
111123
}
112-
<# } #>
113-
<# } else { #>
114-
<# if (c.AsOdcmMethod().ReturnType != null) { #>
124+
<#
125+
}
126+
} else {
127+
if (c.AsOdcmMethod().ReturnType != null) {
128+
#>
115129
/**
116130
* Gets the <#=ReturnType(c)#>
117131
*
@@ -131,7 +145,9 @@
131145
return send(HttpMethod.GET, null);
132146
}
133147

134-
<# if (c.GetFeatures().CanSelect) { #>
148+
<#
149+
if (c.GetFeatures().CanSelect) {
150+
#>
135151
/**
136152
* Sets the select clause for the request
137153
*
@@ -143,8 +159,11 @@
143159
return (<#=TypeRequest(c)#>)this;
144160
}
145161

146-
<# } #>
147-
<# if (c.GetFeatures().CanExpand) { #>
162+
<#
163+
}
164+
165+
if (c.GetFeatures().CanExpand) {
166+
#>
148167
/**
149168
* Sets the expand clause for the request
150169
*
@@ -156,8 +175,11 @@
156175
return (<#=TypeRequest(c)#>)this;
157176
}
158177

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+
#>
161183

162184
/**
163185
* Sets the top value for the request
@@ -169,8 +191,10 @@
169191
getQueryOptions().add(new QueryOption("$top", value+""));
170192
return (<#=TypeRequest(c)#>)this;
171193
}
172-
<# } #>
173-
<# } else { #>
194+
<#
195+
}
196+
} else {
197+
#>
174198
public void get(final ICallback<Void> callback) {
175199
final IExecutors executors = getClient().getExecutors();
176200
executors.performOnBackground(new Runnable() {
@@ -189,6 +213,8 @@
189213
public void get() throws ClientException {
190214
this.send(HttpMethod.GET, null);
191215
}
192-
<# } #>
193-
<# } #>
216+
<#
217+
}
218+
}
219+
#>
194220
}

0 commit comments

Comments
 (0)