WorkQuery
class WorkQuery
A specification for querying WorkRequest
s. 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 |
---|
class WorkQuery.Builder A builder for |
Public companion functions |
|
---|---|
WorkQuery |
Creates a query for |
WorkQuery |
Creates a query for |
WorkQuery |
fromStates(states: List<WorkInfo.State>) Creates a |
WorkQuery |
fromStates(vararg states: WorkInfo.State) Creates a |
WorkQuery |
Creates a query for |
WorkQuery |
Creates a query for |
WorkQuery |
fromUniqueWorkNames(uniqueWorkNames: List<String>) Creates a query for |
WorkQuery |
fromUniqueWorkNames(vararg uniqueWorkNames: String) Creates a query for |
Public properties |
|
---|---|
List<UUID> |
The |
List<WorkInfo.State> |
The |
List<String> |
The |
List<String> |
The |
Public companion functions
fromIds
fun fromIds(ids: List<UUID>): WorkQuery
Creates a query for WorkRequest
s with the given ids.
Parameters | |
---|---|
ids: List<UUID> |
list of ids of |
Returns | |
---|---|
WorkQuery |
a requested WorkQuery |
fromIds
fun fromIds(vararg ids: UUID): WorkQuery
Creates a query for WorkRequest
s with the given ids.
Parameters | |
---|---|
vararg ids: UUID |
ids of |
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 |
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 WorkRequest
s with the given tags.
Parameters | |
---|---|
tags: List<String> |
tags of |
Returns | |
---|---|
WorkQuery |
a requested WorkQuery |
fromTags
fun fromTags(vararg tags: String): WorkQuery
Creates a query for WorkRequest
s with the given tags.
Parameters | |
---|---|
vararg tags: String |
tags of |
Returns | |
---|---|
WorkQuery |
a requested WorkQuery |
fromUniqueWorkNames
fun fromUniqueWorkNames(uniqueWorkNames: List<String>): WorkQuery
Creates a query for WorkRequest
s with the given unique names.
Returns | |
---|---|
WorkQuery |
a requested WorkQuery |
fromUniqueWorkNames
fun fromUniqueWorkNames(vararg uniqueWorkNames: String): WorkQuery
Creates a query for WorkRequest
s with the given unique names.
Parameters | |
---|---|
vararg uniqueWorkNames: String |
unique work names |
Returns | |
---|---|
WorkQuery |
a requested WorkQuery |
Public properties
uniqueWorkNames
val uniqueWorkNames: List<String>
The List
of unique works name being queried