Arbitrary Find

The arbitrary find method lets custom device applications dynamically build queries based on user input. The Query.DISTINCT property lets you exclude duplicate entries from the result set.

The arbitrary find method also lets the user specify a desired ordering of the results and object state criteria. A Query class is included in the client object API. The Query class is the single object passed to the arbitrary search methods and consists of search conditions, object/row state filter conditions, and data ordering information.

Define these conditions by setting properties in a query:
  • TestCriteria – criteria used to filter returned data.
  • SortCriteria – criteria used to order returned data.
  • Skip – an integer specifying how many rows to skip. Used for paging.
  • Take – an integer specifying the maximum number of rows to return. Used for paging.
Set the Query.Distinct property to true to exclude duplicate entries from the result set. The default value is false for entity types, and its usage is optional for all other types.
Query query1 = new Query();
query1.setDistinct(true);

TestCriteria can be an AttributeTest or a CompositeTest.