Tracked Entity Instance Collection Repository
Functions
Adds a new object to the given collection in an asynchronous way based on the provided CreateProjection. It returns a Single<String> with the generated UID, which is completed when the object is added to the database. It adds an object with a State.TO_POST, which will be uploaded to the server in the next upload.
Adds a new object to the given collection in a synchronous way based on the provided CreateProjection. It blocks the current thread and returns the generated UID. It adds an object with a State.TO_POST, which will be uploaded to the server in the next upload. Important: this is a blocking method and it should not be executed in the main thread. Consider the asynchronous version .rxAdd.
Get the count of elements. Important: this is a blocking method and it should not be executed in the main thread. Consider the asynchronous version .rxCount.
Get the list of objects in a synchronous way. Important: this is a blocking method and it should not be executed in the main thread. Consider the asynchronous version .rxGet.
Get the list of uids of objects in scope in a synchronous way. Important: this is a blocking method and it should not be executed in the main thread. Consider the asynchronous version .rxGetUids.
Check if selection of objects with applied filters is empty in a synchronous way. Important: this is a blocking method and it should not be executed in the main thread. Consider the asynchronous version .rxIsEmpty.
Uploads the resources in scope in a synchronous way. Important: this is a blocking method and it should not be executed in the main thread. Consider the asynchronous version .rxUpload. The method will finish as soon as the whole upload an processing is finished.
Uploads the resources in scope in an asynchronous way, returning a Flow<D2Progress> that will emit progress until the whole upload is finished and the Flow is completed.
Get the objects in scope in an asynchronous way, returning a Single<List>.
Uses Paging3 library and return a Flow
Get a ReadOnlyObjectRepository pointing to the first element in the list.
Adds a new object to the given collection in an asynchronous way based on the provided CreateProjection. It returns a Single<String> with the generated UID, which is completed when the object is added to the database. It adds an object with a State.TO_POST, which will be uploaded to the server in the next upload.
Get the objects in scope in an asynchronous way, returning a Single<List>.
Uploads the resources in scope in an asynchronous way. An Observable<D2Progress> is returned, which will emit progress until the whole upload is finished and the Observable is completed.
Adds a new object to the given collection in a suspend way based on the provided CreateProjection. It returns the generated UID when the object is added to the database. It adds an object with a State.TO_POST, which will be uploaded to the server in the next upload.
Get the count of elements in a suspend way.
Get the objects in scope in a suspend way.
Get the list of uids of objects in scope in a suspend way.
Check if selection of objects in current scope with applied filters is empty in a suspend way.
Returns a new ReadOnlyObjectRepository whose scope is the one of the current repository plus the equal filter applied to the uid. This method is equivalent to byUid().eq(uid).one().
Uploads the resources in scope in an asynchronous way. An Observable<D2Progress> is returned, which will emit progress until the whole upload is finished and the Observable is completed.