Skip to content

Commit

Permalink
- removes wrongly added filter and orderby methods in java
Browse files Browse the repository at this point in the history
  • Loading branch information
baywet committed Sep 25, 2020
1 parent 56a5b25 commit 47e2404
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 131 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,30 +58,6 @@ import <#=importNamespace#>.core.IBaseClient;
return (<#=c.TypeReferenceRequest()#>)this;
}
<# } #>
<# if (c.GetFeatures().CanFilter) { #>
/**
* Sets the filter clause for the request
*
* @param value the filter clause
* @return the updated request
*/
public <#=c.ITypeReferenceRequest()#> filter(final String value) {
getQueryOptions().add(new com.microsoft.graph.options.QueryOption("$filter", value));
return (<#=c.TypeReferenceRequest()#>)this;
}
<# } #>
<# if (c.GetFeatures().CanSort) { #>
/**
* Sets the order by clause for the request
*
* @param value the order by clause
* @return the updated request
*/
public <#=c.ITypeReferenceRequest()#> orderBy(final String value) {
getQueryOptions().add(new com.microsoft.graph.options.QueryOption("$orderby", value));
return (<#=c.TypeReferenceRequest()#>)this;
}
<# } #>
<# if (c.GetFeatures().CanUpdate) { #>
/**
* Puts the <#=c.TypeName()#>
Expand Down
26 changes: 0 additions & 26 deletions Templates/Java/requests_extensions/BaseEntityRequest.java.tt
Original file line number Diff line number Diff line change
Expand Up @@ -98,32 +98,6 @@ import <#=importNamespace#>.http.HttpMethod;
return (<#=c.TypeRequest()#>)this;
}

<# } #>
<# if (c.GetFeatures().CanFilter) { #>
/**
* Sets the filter clause for the request
*
* @param value the filter clause
* @return the updated request
*/
public <#=c.ITypeRequest()#> filter(final String value) {
getQueryOptions().add(new com.microsoft.graph.options.QueryOption("$filter", value));
return (<#=c.TypeRequest()#>)this;
}

<# } #>
<# if (c.GetFeatures().CanSort) { #>
/**
* Sets the order by clause for the request
*
* @param value the order by clause
* @return the updated request
*/
public <#=c.ITypeRequest()#> orderBy(final String value) {
getQueryOptions().add(new com.microsoft.graph.options.QueryOption("$orderby", value));
return (<#=c.TypeRequest()#>)this;
}

<# } #>
<# if (c.AsOdcmProperty() != null && c.AsOdcmProperty().IsCollection && c.GetFeatures().CanUseTop) { #>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,28 +88,4 @@ import <#=importNamespace#>.serializer.IJsonBackedObject;
return (<#=c.TypeWithReferencesRequest()#>)this;
}
<# } #>
<# if (c.GetFeatures().CanFilter) { #>
/**
* Sets the filter clause for the request
*
* @param value the filter clause
* @return the updated request
*/
public <#=c.ITypeWithReferencesRequest()#> filter(final String value) {
getQueryOptions().add(new com.microsoft.graph.options.QueryOption("$filter", value));
return (<#=c.TypeWithReferencesRequest()#>)this;
}
<# } #>
<# if (c.GetFeatures().CanSort) { #>
/**
* Sets the order by clause for the request
*
* @param value the order by clause
* @return the updated request
*/
public <#=c.ITypeWithReferencesRequest()#> orderBy(final String value) {
getQueryOptions().add(new com.microsoft.graph.options.QueryOption("$orderby", value));
return (<#=c.TypeWithReferencesRequest()#>)this;
}
<# } #>
}
26 changes: 0 additions & 26 deletions Templates/Java/requests_extensions/BaseMethodBodyRequest.java.tt
Original file line number Diff line number Diff line change
Expand Up @@ -105,31 +105,5 @@ import <#=importNamespace#>.http.HttpMethod;
return (<#=typeRequest#>)this;
}

<# } #>
<# if (c.GetFeatures().CanFilter) { #>
/**
* Sets the filter clause for the request
*
* @param value the filter clause
* @return the updated request
*/
public <#=iTypeRequest#> filter(final String value) {
getQueryOptions().add(new com.microsoft.graph.options.QueryOption("$filter", value));
return (<#=typeRequest#>)this;
}

<# } #>
<# if (c.GetFeatures().CanSort) { #>
/**
* Sets the order by clause for the request
*
* @param value the order by clause
* @return the updated request
*/
public <#=iTypeRequest#> orderBy(final String value) {
getQueryOptions().add(new com.microsoft.graph.options.QueryOption("$orderby", value));
return (<#=typeRequest#>)this;
}

<# } #>
}
31 changes: 0 additions & 31 deletions Templates/Java/requests_extensions/BaseMethodRequest.java.tt
Original file line number Diff line number Diff line change
Expand Up @@ -79,37 +79,6 @@ if (c.AsOdcmMethod().IsAction()) {
return (<#=c.TypeRequest()#>)this;
}

<#
}

if (c.GetFeatures().CanFilter) {
#>
/**
* Sets the filter clause for the request
*
* @param value the filter clause
* @return the updated request
*/
public <#=c.ITypeRequest()#> filter(final String value) {
getQueryOptions().add(new com.microsoft.graph.options.QueryOption("$filter", value));
return (<#=c.TypeRequest()#>)this;
}

<#
}
if (c.GetFeatures().CanSort) {
#>
/**
* Sets the order by clause for the request
*
* @param value the order by clause
* @return the updated request
*/
public <#=c.ITypeRequest()#> orderBy(final String value) {
getQueryOptions().add(new com.microsoft.graph.options.QueryOption("$orderby", value));
return (<#=c.TypeRequest()#>)this;
}

<#
}

Expand Down

0 comments on commit 47e2404

Please sign in to comment.