public interface DriveReader
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsObject(Query query)
Does the backend contain one or more objects that can be identified through the query details
|
void |
containsObjectAsync(Query query,
Consumer<Boolean> onResult)
Does the backend contain one or more objects that can be identified through the query details
|
List<DriveObject> |
readAllObjects(Query query)
Read all object instances found by the specified parameters
|
<T> List<T> |
readAllObjects(Query query,
Class<T> clazz)
Read all object instances found by the specified parameters
|
<T> void |
readAllObjects(Query query,
Class<T> clazz,
Consumer<List<T>> onSuccess,
Consumer<Throwable> onError)
Read all object instances found by the specified parameters
|
void |
readAllObjectsAsync(Query query,
Consumer<List<DriveObject>> onResult)
Read all object instances found by the specified parameters
|
DriveObject |
readObject(Query query)
Read the first object instance found by the specified parameters
|
<T> T |
readObject(Query query,
Class<T> clazz)
Read the first object instance found by the specified parameters
|
<T> void |
readObjectAsync(Query query,
Class<T> clazz,
Consumer<T> onSuccess,
Runnable onFailure,
Consumer<Throwable> onError)
Read the first object instance found by the specified parameters
|
void |
readObjectAsync(Query query,
Consumer<DriveObject> onSuccess,
Runnable onFailure)
Read the first object instance found by the specified parameters
|
List<DriveObject> |
readPagedObjects(Query query,
Pageable pageable)
Read all object instances found by the specified parameters
|
<T> List<T> |
readPagedObjects(Query query,
Pageable pageable,
Class<T> clazz)
Read all object instances found by the specified parameters
|
<T> void |
readPagedObjectsAsync(Query query,
Pageable pageable,
Class<T> clazz,
Consumer<List<T>> onSuccess,
Consumer<Throwable> onError)
Read all object instances found by the specified parameters
|
void |
readPagedObjectsAsync(Query query,
Pageable pageable,
Consumer<List<DriveObject>> onResult)
Read all object instances found by the specified parameters
|
void |
setService(DriveService service)
Sets the service the reader is used by.
|
boolean containsObject(Query query)
query - query details used to search for the objectsvoid containsObjectAsync(Query query, Consumer<Boolean> onResult)
query - query details used to search for the objectsonResult - invoked upon resultDriveObject readObject(Query query)
query - query details used to search for the objectsvoid readObjectAsync(Query query, Consumer<DriveObject> onSuccess, Runnable onFailure)
query - query details used to search for the objectsonSuccess - this is invoked if a result is receivedonFailure - this is invoked if no result is found<T> T readObject(Query query, Class<T> clazz) throws ClassCastException
T - will try to convert the object into the typequery - query details used to search for the objectsclazz - clazz to convert the result intoClassCastException - thrown if found object can not be converted into T<T> void readObjectAsync(Query query, Class<T> clazz, Consumer<T> onSuccess, Runnable onFailure, Consumer<Throwable> onError)
T - will try to convert the object into the typequery - query details used to search for the objectsclazz - clazz to convert the result intoonSuccess - invoked upon found resultonFailure - invoked when no result is queriedonError - called if an error occursList<DriveObject> readAllObjects(Query query)
query - query details used to search for the objectsvoid readAllObjectsAsync(Query query, Consumer<List<DriveObject>> onResult)
query - query details used to search for the objectsonResult - invoked upon result<T> List<T> readAllObjects(Query query, Class<T> clazz) throws ClassCastException
T - will try to convert the objects into the typequery - query details used to search for the objectsclazz - clazz to convert the results intoClassCastException - thrown if found objects can not be converted into T<T> void readAllObjects(Query query, Class<T> clazz, Consumer<List<T>> onSuccess, Consumer<Throwable> onError)
T - will try to convert the objects into the typequery - query details used to search for the objectsclazz - clazz to convert the results intoonSuccess - invoked upon resultonError - called when an error occursList<DriveObject> readPagedObjects(Query query, Pageable pageable)
query - query details used to search for the objectspageable - used for paginationvoid readPagedObjectsAsync(Query query, Pageable pageable, Consumer<List<DriveObject>> onResult)
query - query details used to search for the objectspageable - used for paginationonResult - invoked upon result<T> List<T> readPagedObjects(Query query, Pageable pageable, Class<T> clazz) throws ClassCastException
T - will try to convert the objects into the typequery - query details used to search for the objectspageable - used for paginationclazz - clazz to convert the results intoClassCastException - thrown if found objects can not be converted into T<T> void readPagedObjectsAsync(Query query, Pageable pageable, Class<T> clazz, Consumer<List<T>> onSuccess, Consumer<Throwable> onError)
T - will try to convert the objects into the typequery - query details used to search for the objectspageable - used for paginationclazz - clazz to convert the results intoonSuccess - invoked upon resultonError - called when an error occursvoid setService(DriveService service)
service - service the reader is used byCopyright © 2020. All rights reserved.