defer Execution
Alter this query to defer its execution. This is particular useful when using actions/functions with proxy classes. It allows the use of deferred proxy method calls together with request batches.
- Example using proxy classes:
open fun invokeActionsInBatch(): kotlin.Unit { val service = this.service; val batch = RequestBatch(); val action1 = DataQuery(); val action2 = DataQuery(); service.deleteVideosInCategory("Romance", action1.deferExecution()); service.deleteVideosInCategory("Suspense", action2.deferExecution()); batch.addAction(action1); batch.addAction(action2); service.processBatch(batch); batch.checkActionResult(action1); batch.checkActionResult(action2); }
- Example using proxy classes:
open fun invokeFunctionsInBatch(): kotlin.Unit { val service = this.service; val batch = RequestBatch(); val query1 = DataQuery(); val query2 = DataQuery(); Ignore.valueOf_any(service.getVideosInCategory("Romance", query1.deferExecution())); Ignore.valueOf_any(service.getVideosInCategory("Suspense", query2.deferExecution())); batch.addFunction(query1); batch.addFunction(query2); service.processBatch(batch); val videos1 = Video.list(batch.getFunctionResult(query1).getEntityList()); val videos2 = Video.list(batch.getFunctionResult(query2).getEntityList()); this.showVideos(videos1); this.showVideos(videos2); }
Return
This query.