Skip to content

Service - QueryService

Java Class

com.omnissa.vdi.vlsi.binding.vdi.query.QueryService

See also

QueryDefinition, QueryId, QueryResults

Since

Horizon View 6.0

Service Description

The Query Service provides a uniform simple query interface to allow bulk enumeration of entities, using either a paging or "virtual list" model.

  • To use the paging model, create a query with the QueryService_Create method, get successive results with the QueryService_GetNext method, then release server-side resources with the QueryService_Delete method.
  • To use the "virtual list" model, use the QueryService_Query method to get one page of results at the offset of your choice. There is no need to free server-side resources using this model, but successive queries may be significantly less performant as a result.
  • The privileges on an individual query will be based on the queryEntityType.

Methods

Methods defined in this Service: QueryService_Create, QueryService_Delete, QueryService_DeleteAll, QueryService_DeleteByIds, QueryService_GetCount, QueryService_GetNext, QueryService_Query

Create a cursor for iterating though query results efficiently, and return the first set of results. Creates server-side state which should be explicitly deleted via QueryService_Delete. Server side state will also time out eventually.

Parameters

Name Type Description
_this ManagedObjectReference A reference to the QueryService used to make the method call.
definition QueryDefinition query definition.

Return Value

Type Description
QueryResults first page of results.

Faults

Type Description
EntityNotFound Thrown if any specified entity cannot be found.
InsufficientPermission Thrown if the user does not have sufficient permission to perform the operation.
InvalidArgument Thrown if any specified argument is invalid.
InvalidState Thrown if the per session query limit has been reached.
InvalidType Thrown if the type of any specified argument is invalid.
UnexpectedFault Thrown if an unexpected error occurs while performing the operation.

Show WSDL type definition

Delete the server-side state associated with this cursor. To be used after QueryService_Create.

Parameters

Name Type Description
_this ManagedObjectReference A reference to the QueryService used to make the method call.
id QueryId from a result set.

Return Value

Type Description
None

Faults

Type Description
EntityNotFound Thrown if any specified entity cannot be found.
InsufficientPermission Thrown if the user does not have sufficient permission to perform the operation.
InvalidArgument Thrown if any specified argument is invalid.
InvalidType Thrown if the type of any specified argument is invalid.
UnexpectedFault Thrown if an unexpected error occurs while performing the operation.

Show WSDL type definition

Delete the server-side state associated with any outstanding cursors. To be used after QueryService_Create.

Parameters

Name Type Description
_this ManagedObjectReference A reference to the QueryService used to make the method call.

Return Value

Type Description
None

Faults

Type Description
EntityNotFound Thrown if any specified entity cannot be found.
InsufficientPermission Thrown if the user does not have sufficient permission to perform the operation.
InvalidArgument Thrown if any specified argument is invalid.
InvalidType Thrown if the type of any specified argument is invalid.
UnexpectedFault Thrown if an unexpected error occurs while performing the operation.

Show WSDL type definition

Deletes the server-side states associated with given cursors. To be used after multiple QueryService_Create invocations.

Parameters

Name Type Description
_this ManagedObjectReference A reference to the QueryService used to make the method call.
ids QueryId[] Array of Query Ids to delete.

Return Value

Type Description
None

Faults

Type Description
EntityNotFound Thrown if any specified entity cannot be found.
InsufficientPermission Thrown if the user does not have sufficient permission to perform the operation.
InvalidArgument Thrown if any specified argument is invalid.
InvalidType Thrown if the type of any specified argument is invalid.
UnexpectedFault Thrown if an unexpected error occurs while performing the operation.

Show WSDL type definition

Get only a count of results. Resources are released automatically. This should not be used if any results are needed to be read.

Parameters

Name Type Description
_this ManagedObjectReference A reference to the QueryService used to make the method call.
definition QueryDefinition query definition.

Return Value

Type Description
xsd:int count of objects which match this query.

Faults

Type Description
EntityNotFound Thrown if any specified entity cannot be found.
InsufficientPermission Thrown if the user does not have sufficient permission to perform the operation.
InvalidArgument Thrown if any specified argument is invalid.
InvalidType Thrown if the type of any specified argument is invalid.
UnexpectedFault Thrown if an unexpected error occurs while performing the operation.

Show WSDL type definition

Get the next set of results. To be used after QueryService_Create.

Parameters

Name Type Description
_this ManagedObjectReference A reference to the QueryService used to make the method call.
id QueryId from the previous result set.

Return Value

Type Description
QueryResults next page of results.

Faults

Type Description
EntityNotFound Thrown if any specified entity cannot be found.
InsufficientPermission Thrown if the user does not have sufficient permission to perform the operation.
InvalidArgument Thrown if any specified argument is invalid.
InvalidType Thrown if the type of any specified argument is invalid.
UnexpectedFault Thrown if an unexpected error occurs while performing the operation.

Show WSDL type definition

Perform a "virtual list"-style query for a set of results. Inefficient for iterating through many items. Resources are released automatically.

Parameters

Name Type Description
_this ManagedObjectReference A reference to the QueryService used to make the method call.
definition QueryDefinition query definition.

Return Value

Type Description
QueryResults one page of results.

Faults

Type Description
EntityNotFound Thrown if any specified entity cannot be found.
InsufficientPermission Thrown if the user does not have sufficient permission to perform the operation.
InvalidArgument Thrown if any specified argument is invalid.
InvalidType Thrown if the type of any specified argument is invalid.
UnexpectedFault Thrown if an unexpected error occurs while performing the operation.

Show WSDL type definition