com.backendless.persistence.QueryOptionsBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of backendless Show documentation
Show all versions of backendless Show documentation
Android SDK used by developers to provide Backendless API in apps.
package com.backendless.persistence;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
class QueryOptionsBuilder
{
private List sortBy;
private List related;
private Integer relationsDepth;
private Builder builder;
QueryOptionsBuilder( Builder builder )
{
sortBy = new ArrayList<>();
related = new ArrayList<>();
this.builder = builder;
}
QueryOptions build()
{
QueryOptions queryOptions = new QueryOptions();
queryOptions.setRelated( related );
queryOptions.setRelationsDepth( relationsDepth );
queryOptions.setSortBy( sortBy );
return queryOptions;
}
/*--- Auto-generated code ---*/
public List getSortBy()
{
return sortBy;
}
public Builder setSortBy( List sortBy )
{
this.sortBy = sortBy;
return builder;
}
public Builder setSortBy( String... sortBy )
{
Collections.addAll( this.sortBy, sortBy );
return builder;
}
public Builder addSortBy( String sortBy )
{
this.sortBy.add( sortBy );
return builder;
}
public List getRelated()
{
return related;
}
public Builder setRelated( List related )
{
this.related = related;
return builder;
}
public Builder setRelated( String... related )
{
Collections.addAll( this.related, related );
return builder;
}
public Integer getRelationsDepth()
{
return relationsDepth;
}
public Builder setRelationsDepth( Integer relationsDepth )
{
this.relationsDepth = relationsDepth;
return builder;
}
}