WorkQuery
public
final
class
WorkQuery
extends Object
java.lang.Object | |
↳ | androidx.work.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 classes | |
---|---|
class |
WorkQuery.Builder
A builder for |
Public methods | |
---|---|
List<UUID>
|
getIds()
|
List<WorkInfo.State>
|
getStates()
|
List<String>
|
getTags()
|
List<String>
|
getUniqueWorkNames()
|
Inherited methods | |
---|---|
Public methods
getStates
public List<WorkInfo.State> getStates ()
Returns | |
---|---|
List<WorkInfo.State> |
the List of WorkInfo.State s being queried
|
getUniqueWorkNames
public List<String> getUniqueWorkNames ()
Returns | |
---|---|
List<String> |
the List of unique works name being queried
|
Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-09-30 UTC.