WorkQuery

class WorkQuery


A specification for querying WorkRequests. This is comprised of 4 components; namely ids, unique work names, tags & work states.

A List of WorkRequest ids, or a List of unique work names, or a List of WorkRequest tags, or a List of WorkInfo.State can be specified.

Each component in a WorkQuery is AND-ed with the others. Each value in a component is OR-ed.

Example: (id1 OR id2 OR ...) AND (name1 OR name2 OR ...) AND (tag1 OR tag2 OR ...) AND (state1 OR state2 OR ...)

Summary

Nested types

A builder for WorkQuery.

Public companion functions

WorkQuery
fromIds(ids: List<UUID>)

Creates a query for WorkRequests with the given ids.

WorkQuery
fromIds(vararg ids: UUID)

Creates a query for WorkRequests with the given ids.

WorkQuery

Creates a WorkQuery for the workers in the given WorkInfo.State states.

WorkQuery
fromStates(vararg states: WorkInfo.State)

Creates a WorkQuery for the workers in the given WorkInfo.State states.

WorkQuery

Creates a query for WorkRequests with the given tags.

WorkQuery
fromTags(vararg tags: String)

Creates a query for WorkRequests with the given tags.

WorkQuery
fromUniqueWorkNames(uniqueWorkNames: List<String>)

Creates a query for WorkRequests with the given unique names.

WorkQuery
fromUniqueWorkNames(vararg uniqueWorkNames: String)

Creates a query for WorkRequests with the given unique names.

Public properties

List<UUID>

The List of WorkRequest ids being queried.

List<WorkInfo.State>

The List of WorkInfo.States being queried

List<String>

The List of tags being queried

List<String>

The List of unique works name being queried

Public companion functions

fromIds

fun fromIds(ids: List<UUID>): WorkQuery

Creates a query for WorkRequests with the given ids.

Parameters
ids: List<UUID>

list of ids of WorkRequests

Returns
WorkQuery

a requested WorkQuery

fromIds

fun fromIds(vararg ids: UUID): WorkQuery

Creates a query for WorkRequests with the given ids.

Parameters
vararg ids: UUID

ids of WorkRequests

Returns
WorkQuery

a requested WorkQuery

fromStates

fun fromStates(states: List<WorkInfo.State>): WorkQuery

Creates a WorkQuery for the workers in the given WorkInfo.State states.

Parameters
states: List<WorkInfo.State>

The List of WorkInfo.State

Returns
WorkQuery

a requested WorkQuery

fromStates

fun fromStates(vararg states: WorkInfo.State): WorkQuery

Creates a WorkQuery for the workers in the given WorkInfo.State states.

Parameters
vararg states: WorkInfo.State

states of workers

Returns
WorkQuery

a requested WorkQuery

fromTags

fun fromTags(tags: List<String>): WorkQuery

Creates a query for WorkRequests with the given tags.

Parameters
tags: List<String>

tags of WorkRequests

Returns
WorkQuery

a requested WorkQuery

fromTags

fun fromTags(vararg tags: String): WorkQuery

Creates a query for WorkRequests with the given tags.

Parameters
vararg tags: String

tags of WorkRequests

Returns
WorkQuery

a requested WorkQuery

fromUniqueWorkNames

fun fromUniqueWorkNames(uniqueWorkNames: List<String>): WorkQuery

Creates a query for WorkRequests with the given unique names.

Parameters
uniqueWorkNames: List<String>

The List of unique work names

Returns
WorkQuery

a requested WorkQuery

fromUniqueWorkNames

fun fromUniqueWorkNames(vararg uniqueWorkNames: String): WorkQuery

Creates a query for WorkRequests with the given unique names.

Parameters
vararg uniqueWorkNames: String

unique work names

Returns
WorkQuery

a requested WorkQuery

Public properties

ids

Added in 2.5.0
val idsList<UUID>

The List of WorkRequest ids being queried.

states

Added in 2.4.0
val statesList<WorkInfo.State>

The List of WorkInfo.States being queried

tags

Added in 2.4.0
val tagsList<String>

The List of tags being queried

uniqueWorkNames

Added in 2.4.0
val uniqueWorkNamesList<String>

The List of unique works name being queried