Package com.kii.cloud.storage.query
Class KiiThingQuery
- java.lang.Object
-
- com.kii.cloud.storage.query.KiiThingQuery
-
public class KiiThingQuery extends java.lang.Object
Represents query object to obtain things.
-
-
Constructor Summary
Constructors Constructor Description KiiThingQuery(KiiUser owner, java.util.List<KiiGroup> groups)
Creates a query to search things owned by the specified user and groups.KiiThingQuery(KiiThingQuery query)
Copy constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setLimit(int limit)
Set the maximum number of results returned on response.void
setThingType(java.lang.String thingType)
Sets the thing type to filter the results.java.lang.String
toString()
-
-
-
Constructor Detail
-
KiiThingQuery
public KiiThingQuery(@Nullable KiiUser owner, @Nullable java.util.List<KiiGroup> groups)
Creates a query to search things owned by the specified user and groups. Both the owner and groupOwners parameter are optional, but at least one of them must be supplied.- Parameters:
owner
- User object must be current user.groups
- List of groups must be belonged by current user.
-
KiiThingQuery
public KiiThingQuery(@NonNull KiiThingQuery query)
Copy constructor.- Parameters:
query
-
-
-
Method Detail
-
setThingType
public void setThingType(java.lang.String thingType)
Sets the thing type to filter the results.- Parameters:
thingType
-
-
setLimit
public void setLimit(int limit)
Set the maximum number of results returned on response. This limit behaves in a best effort way, actual number of
returned result may be different with that of requested number.
Server will try to recover the number of objects requested and it will
succeed if the limit is not higher than the maximum page size supported by the server.
If the limit is higher, the number of objects returned will be the maximum page size.- Parameters:
limit
- Maximum return items. If specified limit is <= 0, 0 will be applied. If the specified limit is greater than the limit of the server or limit is set to 0, limit defined in server will be applied.
-
toString
@NonNull public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-