@ApiOperation(nickname = "deviceManagementOperationQuery", value = "Queries the DeviceManagementOperations", notes = "Queries the DeviceManagementOperations with the given DeviceManagementOperations parameter returning all matching DeviceManagementOperations", response = DeviceManagementOperationListResult.class)
@POST
@Path("_query")
@Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
public DeviceManagementOperationListResult query(
@ApiParam(value = "The ScopeId in which to search results.", required = true, defaultValue = DEFAULT_SCOPE_ID) @PathParam("scopeId") ScopeId scopeId,
@ApiParam(value = "The id of the Device in which to search results") @PathParam("deviceId") EntityId deviceId,
@ApiParam(value = "The DeviceManagementOperationQuery to use to filter results.", required = true) DeviceManagementOperationQuery query) throws Exception {
query.setScopeId(scopeId);
AndPredicateImpl andPredicate = new AndPredicateImpl();
andPredicate.and(new AttributePredicateImpl<>(DeviceManagementOperationAttributes.DEVICE_ID, deviceId));
query.setPredicate(andPredicate);
return deviceManagementOperationRegistryService.query(query);
}